美文网首页
Git 使用代理,全局(global)和项目(local)

Git 使用代理,全局(global)和项目(local)

作者: 学着放下 | 来源:发表于2021-03-23 16:20 被阅读0次

设置全局http、https代理

git config --global http.proxy socks5://127.0.0.1:1080
git config --global https.proxy socks5://127.0.0.1:1080

如果只针对某项目设置,在项目根目录下

git config --local http.proxy socks5://127.0.0.1:1080
git config --local https.proxy socks5://127.0.0.1:1080

查看http、https代理配置情况

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

取消http、https代理配置

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

相关文章

网友评论

      本文标题:Git 使用代理,全局(global)和项目(local)

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