当前位置:   article > 正文

配置 Git 客户端的代理设置_git 代理

git 代理

命令行配置代理方式一

  1. git config --global http.proxy http://代理服务器地址:端口号
  2. git config --global https.proxy https://代理服务器地址:端口号

如果有用户名密码按照下面命令配置

  1. git config --global http.proxy http://用户名:密码@代理服务器地址:端口号
  2. git config --global https.proxy https://用户名:密码@代理服务器地址:端口号

取消代理

  1. git config --global --unset http.proxy
  2. git config --global --unset https.proxy

查看配置列表

git config --list

命令行配置代理方式二

git config --global --edit

打开配置界面如下

  1. [http]
  2. proxy = socks5://192.168.0.20:3128
  3. proxy = http://192.168.0.20:3128
  4. [https]
  5. proxy = socks5://192.168.0.20.3128
  6. proxy = hhttps://192.168.0.20.3128
  7. [credential "https://yd-code.srdcloud.cn"]
  8. provider = generic

 

参考链接

https://m.php.cn/faq/506377.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/482614
推荐阅读
相关标签
  

闽ICP备14008679号