当前位置:   article > 正文

命令行git联网失败,但是实际可以联网_浏览器可以访问 githu,命令行无法访问你

浏览器可以访问 githu,命令行无法访问你

最近下载代码的时候发现总是告诉我连不上github的网页,但是我自己通过浏览器又可以上网,找了半天发现这个方法可以。

在这里插入图片描述
记录下这个代理
打开git bash
执行以下命令:

git config --global http.proxy http://127.0.0.1:7890 
git config --global https.proxy http://127.0.0.1:7890
  • 1
  • 2
# 取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy

# 查看代理
git config --global --get http.proxy
git config --global --get https.proxy
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/716682
推荐阅读
相关标签
  

闽ICP备14008679号