我在win7工作并使用sshd设置git服务器。I git --bare init myapp.git
,并正确克隆ssh://git@localhost/home/git/myapp.git
到Cywgin中。但是我又需要配置Cygwin的 git ,我想在Git Bash中进行 git clone 。我运行git clone ssh://git@localhost/home/git/myapp.git
并收到以下消息
ssh_exchange_identification: Connection closed by remote host
然后我ssh -vvv git@localhost
在Git Bash中运行并收到消息
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /c/Users/MoreFreeze/.ssh/identity type -1
debug3: Not a RSA1 key file /c/Users/MoreFreeze/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
// above it repeats 24 times
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /c/Users/MoreFreeze/.ssh/id_rsa type 1
debug1: identity file /c/Users/MoreFreeze/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
看来我的私钥格式错误?BEGIN
而且我发现没有and的私钥中正好有 25 行END
。我很困惑为什么它说不是 RSA1 密钥,我完全确保它是 RSA 2 密钥。
欢迎任何建议。顺便说一句,我已经阅读了谷歌关于这个问题的前 3 页。