git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
git config --global https.proxy https://proxyuser:proxypwd@proxy.server.com:8080
git config --global http.sslVerify false
禁用代理
git config --global --unset http.proxy
git config --global --unset https.proxy
检查当前代理
git config --global --get http.proxy
git config --global --get https.proxy
参考资料
- git 设置和取消代理
- Getting git to work with a proxy server
- github for window 中 git shell 设置代理方法和解决ssl证书错误的问题
- 如何为 Git 设置代理?