Roozen 行动起来,活在当下
Title

git配置github代理

Roozen

·

Article

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

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默认不走代理(gitee or gitcode等),github走代理。

以clash为例:

clashport.png

git config --global http.http://github.com.proxy 'http://127.0.0.1:7890'
git config --global https.https://github.com.proxy 'http://127.0.0.1:7890'

现在已有 0 条评论,1 人点赞
Comment
发表
搜 索
博主