GitHub无法推送之Connection closed by UNKNOWN port 65535
在正常使用git的过程中,执行git push后报错如下:
1 2 3
E connect(5, AF=2 127.0.0.1:8080, 16): Connection refused kex_exchange_identification: Connection closed by remote host Connection closed by UNKNOWN port 65535
其中Connection closed by UNKNOWN port 65535是第一次看见,在中文互联网和外网转了一大圈,试了很多方法都没有成功。于是决定自己找问题。使用ssh -v git@github.com来查看ssh连接到github的详细信息:
1 2 3 4 5 6 7 8 9 10 11 12 13
OpenSSH_8.9p1 Ubuntu-3ubuntu0.4, OpenSSL 3.0.2 15 Mar 2022 debug1: Reading configuration data /home/redrocker/.ssh/config debug1: /home/redrocker/.ssh/config line 2: Applying options for github.com debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files debug1: /etc/ssh/ssh_config line 21: Applying options for * debug1: Executing proxy command: exec socat - PROXY:127.0.0.1:github.com:22,proxyport=8080 debug1: identity file /home/redrocker/.ssh/id_rsa type 0 debug1: identity file /home/redrocker/.ssh/id_rsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.4 2023/11/24 10:53:59 socat[27516] E connect(5, AF=2 127.0.0.1:8080, 16): Connection refused kex_exchange_identification: Connection closed by remote host Connection closed by UNKNOWN port 65535