為 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