Git 设置和取消代理(SOCKS5代理)


设置代理

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 的速度很快,近百兆的项目能在短时间内下载完。

 测试:

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM