git clone 速度慢,设置代理,加快clone速度

设置方法有一下两种:

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

猜你喜欢

转载自www.cnblogs.com/PieDaoChuan/p/9773039.html