测试一下代理是否有效
curl -x http://127.0.0.1:7890 https://aomedia.googlesource.com/aom/
如果有效,将其添加到配置文件中
添加代理
vim ~/.zshrc
或
vim ~/.bash_profile
# Enable Http Proxy for Git
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy https://127.0.0.1:7890
# Disable above config
# git config --global http.proxy ""
# git config --global https.proxy ""