美文网首页
配置github代理,gitee不走代理

配置github代理,gitee不走代理

作者: Bhsun | 来源:发表于2023-03-20 15:39 被阅读0次

在终端中运行以下命令,将代理设置为您的代理服务器地址和端口号:

$ git config --global http.http://github.com.proxy '{http/socks5}://{your.proxy.server}:{port}'
$ git config --global https.https://github.com.proxy '{http/socks5}://{your.proxy.server}:{port}'

将 {your.proxy.server} 和 {port} 替换为您的代理服务器地址和端口号。
例如:

$ git config --global http.http://github.com.proxy 'socks5://127.0.0.1:1089'
$ git config --global https.https://github.com.proxy 'socks5://127.0.0.1:1089'

这样配置的意图:git默认不走代理,github是例外走代理。

相关文章

网友评论

      本文标题:配置github代理,gitee不走代理

      本文链接:https://www.haomeiwen.com/subject/vpourdtx.html