ssh:连接到主机 github.com 端口 22:连接超时 [英] ssh: connect to host github.com port 22: Connection timed out
问题描述
我在一个代理下,我成功地推动了 git 很长一段时间.
现在我无法突然进入 git.
我已经设置了 RSA 密钥和代理并仔细检查了它们,但无济于事,git 向我抛出了页面标题中显示的错误.
I am under a proxy and I am pushing in to git successfully for quite a while.
Now I am not able to push into git all of a sudden.
I have set the RSA key and the proxy and double checked them, with no avail and git is throwing me the error shown in the title of the page.
推荐答案
原因可能是你在网络下修改了防火墙.(在这种情况下,他们可能会故意阻止某些端口)
要仔细检查这是否是原因......做
The reason could be the firewall modification as you are under a network.(In which case they may deliberately block some ports)
To double check if this is the reason ... do
ssh -T git@github.com
这应该超时.如果是这种情况,请以这种方式使用 http 协议而不是 ssh
只需将配置文件中的 url 更改为 http.
方法如下:-
this should timeout.
If that's the case use http protocol instead of ssh this way
just change your url in the config file to http.
Here is how :-
git config --local -e
更改条目
url = git@github.com:username/repo.git
到
url = https://github.com/username/repo.git
这篇关于ssh:连接到主机 github.com 端口 22:连接超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!