https://help.github.com/categories/authenticating-to-github/
还是官方文档好用~
git的代理分2种
git clone https://github.com/DDoSolitary/LxRunOffline
#走https协议
#需要设置https_proxy
git clone git@github.com:DDoSolitary/LxRunOffline.git
#走ssh协议
#设置ssh协议
为ssh设置代理有很多工具 nc connect connect-proxy都可以为ssh设置代理
下面给出 ~/.ssh/config 文件的示例 如果不存在则自行创建
Host github.com *.github.com
ProxyCommand connect-proxy -S 127.0.0.1:2333 %h %p #设置SOCKS代理
IdentityFile ~/.ssh/id_rsa
Host github.com *.github.com
ProxyCommand nc -X 5 -x 127.0.0.1:2333 %h %p #设置SOCKS代理
IdentityFile ~/.ssh/id_rsa