我已经设置了一个带有多个用户的虚拟机。我的主要用户是VM-User,我使用该帐户创建了另一个名为“Joe”的用户。我通过登录VM-User克隆了一个git repo,一切正常。
问题在于,当我尝试通过登录用户“Joe”来克隆相同的repo时,它会要求我输入git服务器的密码。
我已经为"Joe"创建了一个SSH密钥并将其添加到gitosis中。
有人知道我做错了什么吗?
提前感谢:)
SSH调试日志:
问题在于,当我尝试通过登录用户“Joe”来克隆相同的repo时,它会要求我输入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
ssh git@0.0.0.0
)?使用ssh -v git@0.0.0.0
来查看是否使用了您的SSH密钥进行连接。 - helmbertssh -v git@0.0.0.0
(注意-v
标志)。它应该会提供更多有关 SSH 认证失败的信息(特别是要查找类似于“Offering RSA public key: /home/user/.ssh/my_key”的行)。 - helmbert