Capistrano 3.5 Net :: SSH :: AuthenticationFailed:身份验证失败

时间:2016-05-03 21:04:07

标签: ruby-on-rails amazon-web-services ssh capistrano

使用Rails 4.2.0部署capistrano 3.5个应用,并收到错误消息:

以下是Deploy.rb中的ssh行:

set :ssh_options,     { forward_agent: true, user: fetch(:user), keys: %w(~/.ssh/mykey.ppk) }

mykey.ppk是putty用于登录服务器的密钥(aws实例)。

以下是bundle exec cap production deploy

的错误
cap aborted!
Net::SSH::AuthenticationFailed: Authentication failed for user myname@IP
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-3.1.1/lib/net/ssh.rb:246:in `start'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sshkit-1.10.0/lib/sshkit/backends/connection_pool.rb:59:in `call'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sshkit-1.10.0/lib/sshkit/backends/connection_pool.rb:59:in `with'

net-ssh的当前版本为3.1.1。有一篇关于将net-ssh降级为2.7.0' on Capistrano 3.4. However Capistrano 3.5 requires net-ssh 2.8.0 or above. Tried net-ssh 3.1.0`的帖子,问题是相同的。还有什么可以解决Cap 3.5的问题?

1 个答案:

答案 0 :(得分:0)

在用mykey.ppk

替换mykey.pem后,它有效