修改~/.gitconfig文件
增加如下代码:

[http]
    proxy = socks5://127.0.0.1:1080