Capistrano部署**主机密钥验证失败

dan*_*ere 18 capistrano ruby-on-rails

我跟随了其他网站的一些建议,但无济于事.当我尝试时, cap deploy:cold 我一直得到"主机密钥验证失败".

我已经尝试了一切.我已经从我的计算机ssh'd到远程,从已知主机删除和读取两个密钥,从github克隆,从服务器和本地github设置我的公钥.

我在这里错过了什么?


Capfile:https://gist.github.com/1308243


错误:https: //gist.github.com/1308255

小智 79

添加到您的deploy.rb:

ssh_options[:forward_agent] = true
default_run_options[:pty] = true
Run Code Online (Sandbox Code Playgroud)

或者,登录到要部署到的服务器(作为部署用户)并运行:

ssh git@github.com
The authenticity of host 'github.com (207.97.227.239)' can't be established.
RSA key fingerprint is **:**:**:.
Are you sure you want to continue connecting (yes/no)? yes
Run Code Online (Sandbox Code Playgroud)

大多数时候我看到这个问题是当github.com不在你的时候 ~/.ssh/known_hosts

  • +1将github添加到已知主机列表.这通常是这个问题的根本原因. (3认同)

Sau*_*hwa 6

而不是使用看起来像这样git@github.com的git ssh url:definelabs/urbanairship.git

使用一个只读的URL,看起来像这样的git://github.com/definelabs/urbanairship.git