設置代理
git config --global http.proxy 'socks5://127.0.0.1:1080' git config --global https.proxy 'socks5://127.0.0.1:1080'
取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
還有針對 github.com 的單獨配置:
#只對github.com git config --global http.https://github.com.proxy socks5://127.0.0.1:1080 #取消代理 git config --global --unset http.https://github.com.proxy details/84748009
直接使用 socks5 的速度很快,近百兆的項目能在短時間內下載完。
測試: