SSH 在使用 Git 进行推送时遇到问题
我正在尝试在 Assembla (assembla.com) 上设置一个 git 存储库,但在进行第一次“推送”时遇到问题。我对 git 相当无知,但我之前已经成功推送到 github 上的存储库。我在 Windows Vista 上使用 git。当我从相关目录运行 git bash 并输入“git push”时,我得到:
The authenticity of host 'git.assembla.com (64.250.188.42)' can't be established.
RSA fingerprint is 31:06:...(omitted)...:07:e6.
Are you sure you want to continue connecting (yes/no)?
输入“yes”是不行的,它不接受密码。
我知道这与 SSH 密钥有关,但我不知道我的密钥可能出了什么问题。我本地计算机上的 git 名称和电子邮件与我在 Assembla 上输入的名称和电子邮件相匹配,并且我尝试生成新的 SSH 密钥并将 id_rsa.pub 文件上传到 Assembla,但没有效果。
搜索发现了此论坛主题:http://forum.assembla.com/forums/3 /topics/2754
据我所知,管理员在最后一篇文章中提出的建议均不适用。 1 和 2 不应该适用,因为这是网站上的普通帐户,我没有更改任何设置。 3、4和5我相信我已经完成了。 6 我已经完成了,尽管我删除了“GSSAPIAuthentication”行,因为它生成了额外的错误消息。
注意。我在 StackOverflow 上还有另一个关于 Git 的悬而未决的问题。这个问题是不相关的,涉及另一台 Windows 机器。我并没有放弃我的另一个问题。
编辑:
ssh -v [email protected] 的输出]:
$ ssh -v [email protected]
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Users/Philip/.ssh/config
debug1: Applying options for git.assembla.com
debug1: Connecting to git.assembla.com [64.250.188.42] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Philip/.ssh/id_rsa.pub type 1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5-assembla
debug1: match: OpenSSH_5.1p1 Debian-5-assembla pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
The authenticity of host 'git.assembla.com (64.250.188.42)' can't be established.
RSA key fingerprint is 31:06:3b:0d:cd:23:1a:41:dc:f2:c5:7d:9c:24:07:e6.
Are you sure you want to continue connecting (yes/no)?
输出git remote -v
:
$ git remote -v
origin [email protected]:ksv.git (fetch)
origin [email protected]:ksv.git (push)
密码提示:
$ git push
The authenticity of host 'git.assembla.com (64.250.188.42)' can't be established.
RSA key fingerprint is 31:06:3b:0d:cd:23:1a:41:dc:f2:c5:7d:9c:24:07:e6.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'git.assembla.com,64.250.188.42' (RSA) to the list of known hosts.
Enter passphrase for key '/c/Users/Philip/.ssh/id_rsa.pub':
I'm trying to set up a git repository on Assembla (assembla.com) and I'm having trouble making my first "push". I'm fairly ignorant of git, but I've previously successfully pushed to a repository on github. I'm using git on Windows Vista. When I run git bash from the relevant directory and type "git push", I get:
The authenticity of host 'git.assembla.com (64.250.188.42)' can't be established.
RSA fingerprint is 31:06:...(omitted)...:07:e6.
Are you sure you want to continue connecting (yes/no)?
Entering "yes" is no good, it doesn't accept the passphrase.
I know that this has something to do with SSH keys, but I can't figure out what might be wrong with mine. My git name and email on my local machine match up with the ones I've entered on Assembla, and I've tried generating a new SSH key and uploading the id_rsa.pub file to Assembla to no effect.
A search turned up this forum thread: http://forum.assembla.com/forums/3/topics/2754
As far as I can tell none of the suggestions raised by the administrator in the final post apply. 1 and 2 shouldn't apply because this is a vanilla account on the site and I haven't changed any settings. 3, 4 and 5 I believe I have done. 6 I have done, although I deleted the line "GSSAPIAuthentication" because it generated an additional error message.
NB. I have another open question on StackOverflow regarding Git. This question is unrelated and concerns a different Windows machine. I have not abandoned my other question.
Edit:
Output of ssh -v [email protected]
:
$ ssh -v [email protected]
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Users/Philip/.ssh/config
debug1: Applying options for git.assembla.com
debug1: Connecting to git.assembla.com [64.250.188.42] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Philip/.ssh/id_rsa.pub type 1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5-assembla
debug1: match: OpenSSH_5.1p1 Debian-5-assembla pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
The authenticity of host 'git.assembla.com (64.250.188.42)' can't be established.
RSA key fingerprint is 31:06:3b:0d:cd:23:1a:41:dc:f2:c5:7d:9c:24:07:e6.
Are you sure you want to continue connecting (yes/no)?
Output of git remote -v
:
$ git remote -v
origin [email protected]:ksv.git (fetch)
origin [email protected]:ksv.git (push)
The password prompt:
$ git push
The authenticity of host 'git.assembla.com (64.250.188.42)' can't be established.
RSA key fingerprint is 31:06:3b:0d:cd:23:1a:41:dc:f2:c5:7d:9c:24:07:e6.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'git.assembla.com,64.250.188.42' (RSA) to the list of known hosts.
Enter passphrase for key '/c/Users/Philip/.ssh/id_rsa.pub':
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从错误消息来看,问题似乎在于您将您的公钥密钥 (
id_dsa.pub
) 指定为IdentityFile
在 < code>.ssh/config 文件,而不是您的私钥,它只是id_dsa
。提问者在上面的评论中已经确认这就是问题所在。
It looks from the error message as if the problem is that you're specifying your public key (
id_dsa.pub
) asIdentityFile
in your.ssh/config
file instead of your private key, which would be justid_dsa
.The questioner has confirmed in the comments above that this was the problem.