简体   繁体   English

GitHub“连接到github失败”没有错误

[英]GitHub “Failed connect to github” No Error

I'm pretty new to Git, but I've been using GitBash for commits, pushing and pulling for a week or two now. 我对Git很陌生,但我一直在使用GitBash进行提交,现在推动和拉动一两周。 All was working fine, but a day or two ago when I started getting an error everytime I tried to interact with the remote repositories. 一切都工作正常,但一两天前我每次尝试与远程存储库交互时都开始出错。

fatal: unable to access '....': Failed connect to github.com:443; 致命:无法访问'....':连接到github.com失败:443; No error 没错

I've done some Googling and come across similar StackOverflow posts and articles. 我做了一些谷歌搜索,遇到类似的StackOverflow帖子和文章。 From that, I've tried a number of things, including testing the SSH connection across different ports (22 and 443). 从那以后,我尝试了很多东西,包括测试跨不同端口的SSH连接(22和443)。 It looks like port 443 (for HTTPS connections) is blocked, while port 22 seems to be open. 看起来端口443(用于HTTPS连接)被阻止,而端口22似乎是打开的。

GitBash连接错误

From what I understand of this, it looks to me like I might need to change the port Git is using from 443 to 22. I've tried changing the ~/.git/config file and I've tried the git remote set-url command to try to do this, but with no joy. 根据我的理解,它看起来像我可能需要更改Git使用的端口443到22.我已经尝试更改~/.git/config文件,我已经尝试了git remote set-url命令尝试这样做,但没有快乐。

Any information on the original error or on how to change my Git port will be greatly appreciated. 任何有关原始错误或如何更改我的Git端口的信息将不胜感激。

Any reason why you use git via HTTP? 你通过HTTP使用git的原因是什么? I'd suggest using SSH instead. 我建议使用SSH代替。

git clone git@github.com:GreenValley/GitHubSandbox.git

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM