git 设置代理

607 阅读1分钟

设置代理

# git clone http://...
git config --global http.proxy 'socks5://127.0.0.1:1080'
# git clone https://...
git config --global https.proxy 'socks5://127.0.0.1:1080'
# git clone git://...
git config --global core.gitproxy 'socks5://127.0.0.1:1080'

取消代理

git config --global --unset http.proxy