ssh方式

连接为git@xxx
编辑~/.ssh/ssh_config

socks5 proxy

Host github.com
    HostName github.com
    User git
    ProxyCommand nc -v -x localhost:10808 %h %p

http方式

链接为https://github.com/xxx

git config --global http.proxy http://localhost:10809
git config --global https.proxy http://localhost:10809

取消proxy

git config --global --unset http.proxy
git config --global --unset https.proxy
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐