配置github代理,gitee不走代理

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

$ 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不走代理)