git clone通过ssh返回Permission denied(publickey,password)

gay*_*vat 2 git deployment ssh ruby-on-rails vlad-deployer

我有production_server和git_repo_server,git_repo_server .ssh /授权密钥有生产用户id_rsa.pub.当我ssh到production_server并制作git clone时 - 它工作正常,不要问任何密码.当我尝试使用ssh将git repo克隆到我的本地mashine上的production_server时,我看到:

Permission denied, please try again.
Permission denied (publickey,password).
Run Code Online (Sandbox Code Playgroud)

看起来应该配置ssh以将命令发送到远程服务器.但我不知道该怎么做.谢谢你的帮助!

gay*_*vat 6

问题得到解决.我补充道

Host * 
    ForwardAgent yes
Run Code Online (Sandbox Code Playgroud)

到/ etc/ssh/ssh_config

请参阅ssh-agent教程