最近 Github
越来越连接上了, 加个代理吧!
命令行
全局代理
# 使用 socks5 代理
git config --global http.proxy socks5://127.0.0.1:7890
# 必要时需要忽略证书校验
git config --global http.sslVerify false
# 取消代理
git config --global --unset http.proxy
git config --global --unset http.sslVerify
局部网站代理
# 使用 socks5 代理
git config --global http.https://github.com.proxy socks5://127.0.0.1:7890
# 必要时需要忽略证书校验
git config --global http.https://github.com.sslVerify false
# 取消代理
git config --global --unset http.https://github.com.proxy
git config --global --unset http.https://github.com.sslVerify
直接修改配置文件(~/.gitconfig)
全局配置
[http]
proxy = socks5://127.0.0.1:7890
sslVerify = false
局部网站配置
[http "https://github.com"]
proxy = socks5://127.0.0.1:7890
sslVerify = false