【发布时间】:2011-09-24 16:25:26
【问题描述】:
我正在尝试在 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 git@git.assembla.com 的输出:
$ ssh -v git@git.assembla.com
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 git@git.assembla.com:ksv.git (fetch)
origin git@git.assembla.com: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':
【问题讨论】:
-
那么在输入“yes”接受主机密钥后,它会要求输入密码吗?或不?您能否向我们展示您的推送尝试的完整输出? assembla 是否使用 ssh 密钥或用户名/密码,如果它使用密钥,您是否 (a) 将密钥加载到 ssh-agent 中,或者 (b) 配置 ssh 以使用正确的密钥来连接到 assembla?
-
特别是看到密码提示会很有用,这样我们就可以检查被要求输入的是你的私钥的密码,还是用于汇编的密码验证。此外,
ssh -v git@git.assembla.com和git remote -v的输出将很有用。 -
@Mark,我已将这些命令的输出添加到问题中,以及密码提示。
-
(来自
ssh -v git@git.assembla.com的输出不完整——在你说“是”之后的那一点特别令人感兴趣。)然而,一个奇怪的事情是它要求你输入密码到你的 public 密钥id_rsa.pub,而不是你的私钥,它只是id_rsa。它应该做后者。你有没有在/c/Users/Philip/.ssh/config中设置任何配置? -
根据问题中链接的论坛页面上 Assembla 支持人员的建议,我在
config中输入了一些行。论坛帖子表明我应该输入我的“私钥文件”的名称,但是,我错误地输入了我的公钥文件的名称。再试一次,我得到错误“没有共同的参考,没有指定;什么都不做。也许你应该指定一个分支,比如'master'”。我认为这意味着连接成功,我遇到了一个不相关的问题。写一个合适的答案(连接问题),我会接受的。