github代理报错

解决拉取github仓库报错“gnutls_handshake() failed”问题

gnutls_handshake() failed: The TLS connection was non-properly terminated.

排查,代理导致出错。正确的为git配置代理的方法如下:

git config --global http.https://github.com.proxy http://127.0.0.1:7890
git config --global https.https://github.com.proxy https://127.0.0.1:7890

Failed to receive SOCKS4 connect request ack.

git的https使用的是socket4, 设置git的代理为socket5就好了。

git config --global http.proxy 'socks5://127.0.0.1:XX' #(XX 自己代理的端口号 7890) 
git config --global https.proxy 'socks5://127.0.0.1:XX' #(XX 自己代理的端口号) 

ValueError: Unable to determine SOCKS version from socks://127.0.0.1:7891/

unset all_proxy && unset ALL_PROXY
export all_proxy="socks5://127.0.0.1:7891"

你可能感兴趣的:(踩坑之路,git,linux)