我git pull
开始因这个错误随机停止工作
$ git pull
ssh: connect to host github.com port 22: Connection timed
out fatal: The remote end hung up unexpectedly
我尝试调试 git 来查找问题,发现它在ssh
登录 github时卡住了
$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git pull
...
trace: run_command: 'ssh' '[email protected]' 'git-upload-pack '\''putdotio/putio.git'\'''
ssh
在详细模式下不会显示任何相关信息。只是卡住了
ssh -vvv [email protected] git-upload-pack putdotio/putio.git
...
debug1: Connecting to github.com [192.30.252.128] port 22.
tcpdump
因此我在发出命令时查看了输出ssh -T [email protected]
工作时:
hosted-by.leaseweb.com.33653 > ip1b-lb3-prd.iad.github.com.ssh: Flags [S], cksum 0x9f4a (incorrect -> 0x8575), seq 1215933853, win 14600, options [mss 1460,sackOK,TS val 1208500 ecr 0,nop,wscale 5], length 0
ip1b-lb3-prd.iad.github.com.ssh > hosted-by.leaseweb.com.33653: Flags [S.], cksum 0x937c (correct), seq 970827310, ack 1215933854, win 14240, options [mss 1436,sackOK,TS val 4281013291 ecr 1208500,nop,wscale 10], length 0
hosted-by.leaseweb.com.33653 > ip1b-lb3-prd.iad.github.com.ssh: Flags [.], cksum 0x9f42 (incorrect -> 0xf7f5), seq 1, ack 1, win 457, options [nop,nop,TS val 1208521 ecr 4281013291], length 0
ip1b-lb3-prd.iad.github.com.ssh > hosted-by.leaseweb.com.33653: Flags [P.], cksum 0xb512 (correct), seq 1:48, ack 1, win 14, options [nop,nop,TS val 4281013313 ecr 1208521], length 47
即时响应。
当它不起作用时:
hosted-by.leaseweb.com.45295 > ip1d-lb3-prd.iad.github.com.ssh: Flags [S], cksum 0x9f4c (incorrect -> 0xcc2f), seq 2556120523, win 14600, options [mss 1460,sackOK,TS val 1182830 ecr 0,nop,wscale 5], length 0
hosted-by.leaseweb.com.45295 > ip1d-lb3-prd.iad.github.com.ssh: Flags [S], cksum 0x9f4c (incorrect -> 0xcb35), seq 2556120523, win 14600, options [mss 1460,sackOK,TS val 1183080 ecr 0,nop,wscale 5], length 0
hosted-by.leaseweb.com.45295 > ip1d-lb3-prd.iad.github.com.ssh: Flags [S], cksum 0x9f4c (incorrect -> 0xc940), seq 2556120523, win 14600, options [mss 1460,sackOK,TS val 1183581 ecr 0,nop,wscale 5], length 0
只是没有答案。
我尝试使用连接到同一网络的其他主机,github 没有问题。ssh
来自有问题的主机的所有其他连接都没有超时。成功连接与超时比率约为。2/3
问题是什么?