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

猜你喜欢

转载自www.cnblogs.com/wwct/p/12235562.html
今日推荐