設置方法有一下兩種:
1、
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
2、
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
其中,端口號1080為VPN設置的代理端口,可自行修改為自己的VPN代理端口,樓主使用第一種無加速效果,第二種代理方式速度得到明顯提升,峰值可達1M/s。
取消git代理設置:
git config --global --unset http.proxy
git config --global --unset https.proxy