brew、guthub访问不了、访问慢的问题,设置代理

brew的问题,可以使用国内源替换,比如清华大学的源
https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/

 

github可以使用代理,设置方法:

只对Github代理:

#使用socks5代理(推荐)
git config --global http.https://github.com.proxy socks5://127.0.0.1:51837
#使用http代理(不推荐)
git config --global http.https://github.com.proxy http://127.0.0.1:58591

 

取消代理
当你不需要使用代理时,可以取消之前设置的代理。

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

 

git设置全局代理:

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