如果是socks协议,查看自己本地端口(如1080),则直接使用如下命令即可:
git config --global http.proxy 'socks5://127.0.0.1:1080'
查看代理
git config --global --get http.proxy
git config --global --get https.proxy
设置代理
http类型代理
git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1088
socks5类型代理
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'