git 代理

配置

  1. 打开翻墙软件,查看 http 代理服务器。例如 Shadowsocks.app为:127.0.0.1:1087
  2. 设置 git 全局代理:git config --global http.proxy SOCKS://127.0.0.1:1087

还原

1
2
3
4
5
6
# 方式一
git config --global --unset http.proxy

# 方式二
git config --global --unset http.https://github.com.proxy