开发工具-git设置代理模式

github不使用代理就可以访问, 但有的时候clone和push的速度很慢,我们可以使用git代理来提高速度…

设置代理:

全局代理(http和https代理)

git config --global http.proxy 127.0.0.1:19180
git config --global https.proxy 127.0.0.1:19180

局部代理(http和https代理)

局部代理,在git仓库内执行

git config --local http.proxy 127.0.0.1:19180
git config --local https.proxy 127.0.0.1:19180

取消代理:

取消全局代理(http和https代理)

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

取消局部代理(http和https代理)

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

参考文档:简述:git设置代理模式,仅为github设置代理

打赏
  • 版权声明: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!

请我喝杯卡布奇诺吧~

支付宝
微信