ubuntu中,执行git clone https://github.com/mininet/mininet.git读取github仓库源码时,报错如下:
gnutls_handshake() failed: The TLS connection was non-properly terminated.
由于代理设置有错,为 http 错误配置了 https 的代理,导致出错。
git config --global --unset http.proxy
git config --global --unset https.proxy
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
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
也可以这样子仅代理GitHub
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
#取消代理
git config --global --unset http.https://github.com.proxy