配置 Git 客户端的代理设置

命令行配置代理

git config --global http.proxy http://代理服务器地址:端口号 
git config --global https.proxy https://代理服务器地址:端口号

如果有用户名密码按照下面命令配置

git config --global http.proxy http://用户名:密码@代理服务器地址:端口号 
git config --global https.proxy https://用户名:密码@代理服务器地址:端口号

取消代理

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

查看配置列表

git config --list