使用git的全局配置命令,添加针对github.com的代理设置:
sh
$ git config --global https.github.com.proxy socks5://127.0.0.1:7890$ git config --global https.github.com.proxy socks5://127.0.0.1:7890上述命令的结果,就是在~/.gitconfig文件里增加了如下配置。
ini
[https "github.com"]
proxy = socks5://127.0.0.1:7890 [https "github.com"]
proxy = socks5://127.0.0.1:7890对于国内的网络环境,可以说是极为实用。