Git 修改 proxy,解決代理導致的代碼無法 push 或 pull 的問題


轉載: https://blog.csdn.net/w_yunlong/article/details/54919192

 

事由:
更新 git@osc 代碼時,執行 git pull 響應一段時間后輸出 socket5 read timeout

解決方案:修改 git 的代理設置,這里是去掉了代理部分

關於 git 設置代理的方法:

// 查看當前代理設置
git config --global http.proxy
git config --global https.proxy

// 設置當前代理為 http://127.0.0.1:1080 或 socket5://127.0.0.1:1080
git config --global http.proxy 'http://127.0.0.1:1080'
git config --global https.proxy 'http://127.0.0.1:1080'

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

// 刪除 proxy
git config --global --unset http.proxy
git config --global --unset https.proxy


---------------------
作者:大事龍
來源:CSDN
原文:https://blog.csdn.net/w_yunlong/article/details/54919192
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!


免責聲明!

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



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