<分区>
我在 win7 上工作,并使用 sshd 设置 git 服务器。
我 git --bare init myapp.git
,并在 Cywgin 中克隆 ssh://git@localhost/home/git/myapp.git
正确。但是我又需要配置 Cygwin 的 git,我想在 Git Bash 中克隆 git。我运行 git clone ssh://git@localhost/home/git/myapp.git
并得到以下消息
ssh_exchange_identification: Connection closed by remote host
然后我在 Git Bash 中运行 ssh -vvv git@localhost
并获取消息
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
我的私钥格式似乎有误?而且我发现私钥中正好有25行没有BEGIN
和END
。
我很困惑为什么它说的不是 RSA1 key ,我完全确定它是 RSA 2 key 。
欢迎任何建议。 顺便说一句,我已经在谷歌上阅读了前 3 页关于这个问题的内容。