Git 设置代理以解决 Github 访问缓慢的问题

说明: http或socks5代理自备

配置代理

1
2
3
4
5
# http代理
$ git config --global http.https://github.com.proxy http://127.0.0.1:1080

# socks5代理
$ git config --global http.https://github.com.proxy socks5://127.0.0.1:1080

取消代理(还原)

1
$ git config --global --unset http.https://github.com.proxy