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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM