设置当前代理为 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设置、查看、取消代理

删除代理:

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

相关文章:

  • 2022-01-29
  • 2022-02-08
  • 2021-06-07
  • 2022-01-22
  • 2022-02-03
  • 2022-01-28
猜你喜欢
  • 2021-12-10
  • 2022-12-23
  • 2022-02-24
  • 2022-01-02
相关资源
相似解决方案