我正在Digital Ocean上设置一个VPS来托管我的简单Rails应用程序,我正在尝试运行此命令的版本来测试代理ssh转发正在运行:
ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git'
但是失败了。我关注的Capistrano指南(http://capistranorb.com/documentation/getting-started/authentication-and-authorisation/)说,如果那些失败则执行以下操作:
如果收到错误“主机密钥验证失败”。登录你的 服务器并以部署用户ssh git@github.com命令运行 将github.com添加到已知主机列表中。
我这样做但得到:
$ ssh git@github.com
The authenticity of host 'github.com (192.30.252.131)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/deploy/.ssh/known_hosts).
Permission denied (publickey).
任何想法为什么?