美文网首页
git使用代理

git使用代理

作者: 博楠同学 | 来源:发表于2023-11-17 11:41 被阅读0次

全局代理

git config --global http.proxy http://127.0.0.1:12333
git config --global https.proxy https://127.0.0.1:12333

仅针对github进行代理

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

# 这一行可以不写,这个是代理ssh的方式,如果需要这样需要先把秘添加进github
git config --global url."git@github.com:".proxy http://127.0.0.1:12333

go get的时候会使用git的http,私有库会使用https需要使用账号密码
使用http转ssh

git config --global url."git@gitlab.com:".insteadOf https://gitlab.com/

相关文章

网友评论

      本文标题:git使用代理

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