简单直接的输出干货,复制->粘贴->完活.
Http代理设置
全局
git config --global http.proxy socks5://127.0.0.1:10808
指定github
git config --global http.https://github.com.proxy socks5://127.0.0.1:10808
SSH代理设置
Linux
配置文件在home目录下的 .ssh/config 其中 nc 程序位于 /usr/bin/nc
$ cat ~/.ssh/config
Host github.com
Hostname ssh.github.com
User git
Port 443
ProxyCommand nc -v