设置代理的前提是你电脑已经配置好代理(科学上网)。否则设置无效。并且克隆的时候会报错。
设置代理
git config --global http.proxy ‘socks5://127.0.0.1:10808’
git config --global https.proxy ‘socks5://127.0.0.1:10808’
ps:10808是你代理监听的端口号,需要跟代理一致
查询是否使用代理
git config --global http.proxy
git config --global https.proxy
取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy