1、设置git代理 git config --global http.https://github.com.proxy socks5://127.0.0.1:1080 2、设置ssh代理 修改 ~/.ssh/config 文件,添加如下内容: Host github.com User git