1、git设置代理
git config --global https.proxy http://127.0.0.1:1088
git config --global https.proxy https://127.0.0.1:1088
git config --global https.proxy socks5://127.0.0.1:1088
#只对github.com
git config --global http.https://github.com.proxy socks5://127.0.0.1:1088
端口号替换成你自己的就行了。
2、git取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
#取消代理github.com
git config --global --unset http.https://github.com.proxy)
参考:git 设置和取消代理