我在代理下,我在相当长的一段时间内成功地推进。 现在我突然不能进入git了。 我已经设置了RSA密钥和代理,并仔细检查了它们,没有效果,git抛出了页面标题中显示的错误。


当前回答

刷新我的网络连接对我很有效。

此外,如果你使用移动热点-重新启动移动设备是解决方案在我的情况下。

其他回答

重启电脑帮我解决了这个问题。 Git版本:2.27.0.windows.1 操作系统版本:Windows 10

原因可能是防火墙修改,因为您处于网络中。(在这种情况下,他们可能会故意封锁一些端口) 再次确认这是否是原因…做

ssh -T git@github.com

这应该会超时。 如果是这种情况,使用http协议而不是ssh 只需将配置文件中的url更改为http。 方法如下:-

git config --local -e

变更分录

 url = git@github.com:username/repo.git

to

url = https://github.com/username/repo.git

基本URL重写

Git提供了一种使用Git配置重写url的方法。只需发出以下命令:

git config --global url."https://".insteadOf git://

现在,就像变魔术一样,所有git命令都将执行git://到https://的替换

来源: git://协议被公司阻止,我怎么能绕过它?

好试试这个ssh -T -p 443 git@ssh.github.com而不是ssh -T git@github.com

执行:

nc -v -z <git-repository> <port>

你的输出应该是这样的:

"Connection to <git-repository> <port> port [tcp/*] succeeded!"

如果你得到:

connect to <git-repository> <port> (tcp) failed: Connection timed out

您需要编辑~/。ssh / config文件。添加如下内容:

Host example.com
Port 1234