git設置、查看、取消代理


設置當前代理為 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'

查看當前代理:

 

git config --global --get http.proxy

git config --global --get https.proxy

 

  查詢的時候沒有打印任何東西證明沒有設置代理,如果設置了代理就會直接顯示

  

刪除代理:

git config --global --unset http.proxy

git config --global --unset https.proxy

 參考鏈接:https://www.cnblogs.com/yongy1030/p/11699086.html

     https://blog.csdn.net/qq_29364417/article/details/85940097

     https://baijiahao.baidu.com/s?id=1606573801465636505&wfr=spider&for=pc


免責聲明!

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



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