git clone要求输入密码(多个用户)

时间:2013-01-28 17:37:35

标签: git ssh

我已经设置了一个包含多个用户的VM。我的主要用户是VM-User,并使用该帐户创建了另一个名为“Joe”的用户。我已经通过loggin将一个git repo克隆到VM-User中,一切正常。

我遇到的问题是,当我尝试通过loggin将相同的repo克隆到用户“Joe”时,它会要求我输入git服务器的密码。

git clone git@0.0.0.0:repo.git some_folder

它的节目:

git@0.0.0.0's password: (asks me to type in a password)

我为“Joe”创建了一个ssh密钥并将其添加到gitosis中。

有谁知道我做错了什么?

提前致谢:)

SSH调试日志:

debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: email@example.com
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/joe/.ssh/id_rsa
debug1: Trying private key: /home/joe/.ssh/id_dsa
debug1: Trying private key: /home/joe/.ssh/id_ecdsa
debug1: Next authentication method: password

2 个答案:

答案 0 :(得分:2)

您没有在克隆计算机上设置授权密钥,否则SSH将无法执行此步骤:

 debug1: Next authentication method: password 

我会检查VM和克隆机上是否有正确的密钥。

答案 1 :(得分:0)

我有同样的问题。我只是按回Enter以回复Enter file in which to save the key (/c/Users/sposada/.ssh/id_rsa):,我复制了id_rsa.pub并更改了服务器中的名称。

git正试图从/home/joe/.ssh/id_rsa获取ssh公钥,但您有/home/joe/.ssh/joe

相关问题