配置gitbash中的代理
Ray Cheng 英砖生

在Giibash中配置代理主要有两个原因:

一是有时候在Gitbash中下载东西的时候,哪怕有科学上网也很慢,通过直接配置代理,来保证每次都成功使用科学上网访问。
二是在使用GitHub Desktop的时候,有时会突然间报错fatal: unable to access ‘https://github.com/...,取消代理配置,这个问题就会得到解决,不知道具体原因如何。

配置Gitbash中的代理

Git设置全局http代理和https代理

1
2
git config --global http.proxy 127.0.0.1:1080
git config --global https.proxy 127.0.0.1:1080

取消这两个全局代表

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