Git設置代理和取消代理的方式


  (一)設置代理

  (1)命令方式設置http代理:git config --global http.proxy  xxxx

  (2)命令方式設置https代理:git config --global https.proxy  xxxx

  (3)命令方式設置core代理:git config --global core.gitproxy  xxxx

  (4)配置文件方式設置代理:找到.gitconfig文件,添加如下內容:

[http]
    proxy = xxx
[https]
    proxy = xxx
[core]
    gitproxy = xxx

  (二)取消代理

  (1)命令方式:git config --global --unset http.proxy

        git config --global --unset https.proxy

        git config --global --unset core.gitproxy

  (2)文件方式:找到.gitconfig文件,直接將http段下的proxy區塊刪除,https段下的proxy區塊刪除,core段下的gitproxy區塊刪除,刪除后效果如下所示:

[http]
[https]
[core]

 


免責聲明!

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



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