您的位置:首页 > 其它

Problem of testing SSH in git behind proxy

2014-08-19 10:00 323 查看
Error
like: 'ssh: github.com: no address associated with name'

solve:

setting http.proxy will not work for ssh. You need to proxy your ssh connection. See this description.
To summarize:

Start git-cmd.bat and create ~/.ssh/config (
notepad
%home%\.ssh\config.
)
ProxyCommand /bin/connect.exe -H proxy.server.name:3128 %h %p

Host github.com
User git
Port 22
Hostname github.com
IdentityFile "C:\users\username\.ssh\id_rsa"
TCPKeepAlive yes
IdentitiesOnly yes

Host ssh.github.com
User git
Port 443
Hostname ssh.github.com
IdentityFile "C:\users\username\.ssh\id_rsa"
TCPKeepAlive yes
IdentitiesOnly yes


(set the correct proxy hostname:port, and the path to id_rsa. When you use git-bash, use slashes in the path to id_rsa)

Now 
ssh
github.com
 should work
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  git