為git配置代理
#設(shè)置 注意都要設(shè)置 這幾個(gè)是不同的
git config --global https.proxy http://127.0.0.1:1086
git config --global https.proxy https://127.0.0.1:1086
git config --global http.proxy 'socks5://127.0.0.1:1086'
git config --global https.proxy 'socks5://127.0.0.1:1086'
http.https://github.com.proxy=socks5://127.0.0.1:1086
https.https://github.com.proxy=socks5://127.0.0.1:1086
#取消
git config --global --unset http.proxy
git config --global --unset https.proxy
為終端程序臨時(shí)配置代理,關(guān)閉窗口后失效
$ export http_proxy=socks5://127.0.0.1:1086 # 配置http訪問的
$ export https_proxy=socks5://127.0.0.1:1086 # 配置https
$ export all_proxy=socks5://127.0.0.1:1086 # 配置http和https訪
臨時(shí)取消所有代理
export http_proxy=""
export https_proxy=""
export HTTP_PROXY=""
export HTTPS_PROXY=""