情况
我正在使用Linux(薄荷伴侣17.2),当通过 ssh 推送到 github 时,有时连接会失败,通常会在重新启动计算机和网络后恢复。几天后,可能又变坏了,很混乱。
通过http推送从来没有这样的问题,但它需要密码,不太方便。
调试信息
通过 ssh 推送时:
debug1:连接到 github.com [192.30.252.129] 端口 22。
它卡在了上面的线上。
然后经过漫长的等待,得到超时提示:
debug1:连接到地址192.30.252.129端口22:连接超时
ssh:连接到主机 github.com 端口 22:连接超时
致命:无法从远程存储库读取。
问题:
可能是什么原因,如何解决?
更多调试信息:
ping 良好:
eric@eric-pc:~$ ping 192.30.252.129
PING 192.30.252.129 (192.30.252.129) 56(84) bytes of data.
64 bytes from 192.30.252.129: icmp_seq=1 ttl=50 time=345 ms
64 bytes from 192.30.252.129: icmp_seq=2 ttl=50 time=452 ms
64 bytes from 192.30.252.129: icmp_seq=3 ttl=50 time=373 ms
64 bytes from 192.30.252.129: icmp_seq=4 ttl=50 time=349 ms
64 bytes from 192.30.252.129: icmp_seq=5 ttl=50 time=346 ms
64 bytes from 192.30.252.129: icmp_seq=6 ttl=50 time=442 ms
64 bytes from 192.30.252.129: icmp_seq=7 ttl=50 time=344 ms
telnet 不好:
eric@eric-pc:~$ telnet 192.30.252.129 22
Trying 192.30.252.129...
@Update:
我在同一网络中设置另一台计算机,使用相同的 ssh 密钥,它成功通过 ssh 推送到 github,而原始计算机仍然超时。
Actions:
eric 2552 0.0 0.0 0 0 ? Zs Jan08 0:00 [ssh-agent]
eric 27080 0.0 0.0 10628 316 ? Ss 15:26 0:00 ssh-agent
eric 27168 0.0 0.0 17028 2548 pts/7 S+ 15:27 0:00 grep --color=auto ssh-agent
Guess:
- ssh-agent 有问题,
- github 由于某种原因屏蔽了我的客户端,
实际上,在提问之前,我从谷歌上看到了类似的问题,但没有解决问题,也没有解释原因。
这个问题真的很烦人,因为我不想每次推送都输入密码,也不想时不时地重新启动我的电脑,有什么帮助吗?