I followed this tutorial to deploy my Rails 4 app using capistrano to AWS and having a hard time solving this issue.
When I run cap production deploy
, it fails with the below error
Net::SSH::AuthenticationFailed: deploy
Below is the is full trace
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke bundler:map_bins (first_time)
** Execute bundler:map_bins
** Invoke rvm:hook (first_time)
** Execute rvm:hook
** Invoke rvm:check (first_time)
** Execute rvm:check
DEBUG [2439e1e0] Running ~/.rvm/bin/rvm version on 52.37.242.197
DEBUG [2439e1e0] Command: ~/.rvm/bin/rvm version
cap aborted!
Net::SSH::AuthenticationFailed: deploy
/home/pavan/.rvm/gems/ruby-2.2.3/gems/net-ssh-2.7.0/lib/net/ssh.rb:215:in `start'
/home/pavan/.rvm/gems/ruby-2.2.3/gems/sshkit-1.3.0/lib/sshkit/backends/connection_pool.rb:25:in `create_or_reuse_connection'
/home/pavan/.rvm/gems/ruby-2.2.3/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:173:in `ssh'
/home/pavan/.rvm/gems/ruby-2.2.3/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:126:in `block in _execute'
/home/pavan/.rvm/gems/ruby-2.2.3/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:123:in `tap'
/home/pavan/.rvm/gems/ruby-2.2.3/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:123:in `_execute'
/home/pavan/.rvm/gems/ruby-2.2.3/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:76:in `capture'
/home/pavan/.rvm/gems/ruby-2.2.3/gems/capistrano-rvm-0.1.2/lib/capistrano/tasks/rvm.rake:9:in `block (3 levels) in <top (required)>'
/home/pavan/.rvm/gems/ruby-2.2.3/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/home/pavan/.rvm/gems/ruby-2.2.3/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `run'
/home/pavan/.rvm/gems/ruby-2.2.3/gems/sshkit-1.3.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => rvm:check
According to this SO post I tried locking net-ssh
at 2.7.0
and net-ssh-gateway
at 1.2.0
but the error still persists. Any help is appreciated.
Environment:
OS - Ubuntu 14.04 LTS
Ruby - 2.2.3p173
Rails - 4.2.5
Capistrano - 3.4.0
net-ssh - 2.7.0
net-ssh-gateway - 1.2.0