Github 程序员加速 http和ssh代理设置

简单直接的输出干货,复制->粘贴->完活.

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 -x 127.0.0.1:10808 %h %p

Windows

使用Git Bash

$ cat ~/.ssh/config

Host github.com
Hostname ssh.github.com
User git
Port 443
ProxyCommand "C:\Program Files\Git\mingw64\bin\connect.exe" -S 127.0.0.1:10808 %h %p

你可能感兴趣的:(开发工具,开发效率,github,http代理,ssh代理,github加速)