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