使用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的问题?
答案 0 :(得分:0)
在用mykey.ppk
mykey.pem
后,它有效