/

git代理

设置代理

1
2
3
4
git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

取消代理

1
2
git config --global --unset http.proxy
git config --global --unset https.proxy

只对github设置代理

1
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080

取消github代理

1
git config --global --unset http.https://github.com.proxy