- tags::
git 代理配置
配置 http/https 协议代理:
git config --global http.https://github.com.proxy socks5://127.0.0.01:10880
配置 ssh 协议代理:
Host github.com
User git
Hostname github.com
TCPKeepAlive yes
ProxyCommand nc -v -x 127.0.0.1:10880 %h %p
Host ssh.github.com
User git
Port 443
Hostname ssh.github.com
TCPKeepAlive yes
ProxyCommand nc -v -x 127.0.0.1:10880 %h %p
配置完成后 ssh 可以通过以下命令测试连接:
# 测试是否设置成功
ssh -T git@github.com