ssh_exchange_identification

时间:2011-05-11 19:30:10

标签: git ssh cygwin

我的windows 7系统与cygwin是公司防火墙的后面,我安装了开瓶器,我的配置文件读取

User git
    HostName ssh.github.com
    Port 443
    ProxyCommand /d/cygwin/bin/corkscrew http://x.x.x.x 80 %h %p /c/Users/ad cd/.ssh/id_rsa.

但当我做git clone ssh://git@github.com:443/rails/rails.git时, 我收到了错误

Cloning into rails...
ssh_exchange_identification: Connection closed by remote host
fatal: The remote end hung up unexpectedly

2 个答案:

答案 0 :(得分:3)

您的corkscrew配置存在一些问题。

第一个问题(可能是真正的问题)是corkscrew的第一个参数应该是主机名,而不是URI。所以删除http://前缀。第二个参数让开瓶器知道代理服务器在端口80上。

另一个问题是corkscrew使用用户名:password authfile来授权代理,而不是RSA密钥。您的最后一个参数是RSA私钥,而不是authfile。

除此之外,您的RSA公钥很可能未在github中注册。

答案 1 :(得分:0)

Git只使用SSH作为传输/安全性,因此请尝试使用ssh -v直接进入开发框,以查看您的密钥是否正确传递和接受。