当你的电脑开启翻墙软件的时候,使用git连接github会遇到443的错误,如:
Push failed: Failed with error: unable to access 'https://github.com/zrunker/ibooker/':
OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
这种情况基本上是git代理出现了问题。
Git支持三种协议:git://、ssh://和http://,本来push的时候应该走ssh隧道的,但是因为设置了http代理,所以就走了http的代理,于是就提交不了了。
这里就需要了解一下Git设置代理的基本方式了。
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
碰到以上情况,只需要执行取消代理重新执行Git命令即可。