ZBLOG

git config --global http.proxy= git config --global https.proxy=这两个该怎么配置

这两个命令是用来配置 Git 在使用 HTTP 和 HTTPS 协议访问远程仓库时的代理设置。

具体操作如下:

  1. 打开终端或命令行窗口,输入以下命令来设置 HTTP 代理地址:
   git config --global http.proxy <your_proxy_addr>

其中 <your_proxy_addr> 是你所使用的 HTTP 代理服务器的地址和端口号。例如:

   git config --global http.proxy http://proxy.example.com:8080
  1. 输入以下命令来设置 HTTPS 代理地址:
   git config --global https.proxy <your_proxy_addr>

其中 <your_proxy_addr> 是你所使用的 HTTPS 代理服务器的地址和端口号。例如:

   git config --global https.proxy https://proxy.example.com:8080
  1. 配置完成后,可以通过以下命令查看已经配置好的代理设置:
   git config --global --get-regexp proxy

如果你想要取消已经配置好的代理设置,可以使用以下命令:

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

这样就会将 Git 的代理设置恢复为默认值。

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://golang.0voice.com/?id=3676

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?