为 git 设定 socks5 代理


为 git 设定 socks5 代理

查看当前设定

git config --global -l

为 git 设定全局代理

git config --global http.proxy socks5h://127.0.0.1:1080
git config --global https.proxy socks5h://127.0.0.1:1080

其中127.0.0.1:1080为你所使用的代理服务器IP地址及端口。这里我使用的是 ShadowsocksR 默认本地端口。

只对 GitHub 设定全局代理

git config --global http.https://github.com.proxy socks5h://127.0.0.1:1080
git config --global https.https://github.com.proxy socks5h://127.0.0.1:1080

取消设定

git config --global --unset http.proxy
git config --global --unset https.proxy


免责声明!

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



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