I'm running into this same issue after following the instructions on this page:
https://www.digitalocean.com/community/tutorials/deploying-a-rails-app-on-ubuntu-14-04-with-capistrano-nginx-and-puma The only thing I've changed is the details of my server and my user. When i ssh into the machine i am able to get in without entering a password (i've used ssh-copy to transfer my key), but when i try to do cap production deploy:initial --trace I get the following error: ** 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 deploy:set_rails_env (first_time) ** Execute deploy:set_rails_env ** Invoke deploy:set_linked_dirs (first_time) ** Execute deploy:set_linked_dirs ** Invoke deploy:set_rails_env ** Invoke rvm:hook (first_time) ** Execute rvm:hook cap aborted! Net::SSH::AuthenticationFailed: Authentication failed for user [email protected] /Users/myuser/.rvm/gems/ruby-2.3.1/gems/net-ssh-3.2.0/lib/net/ssh.rb:249:in `start' /Users/myuser/.rvm/gems/ruby-2.3.1/gems/sshkit-1.11.2/lib/sshkit/backends/connection_pool.rb:59:in `call' /Users/myuser/.rvm/gems/ruby-2.3.1/gems/sshkit-1.11.2/lib/sshkit/backends/connection_pool.rb:59:in `with' /Users/myuser/.rvm/gems/ruby-2.3.1/gems/sshkit-1.11.2/lib/sshkit/backends/netssh.rb:155:in `with_ssh' /Users/myuser/.rvm/gems/ruby-2.3.1/gems/sshkit-1.11.2/lib/sshkit/backends/netssh.rb:108:in `execute_command' /Users/myuser/.rvm/gems/ruby-2.3.1/gems/sshkit-1.11.2/lib/sshkit/backends/abstract.rb:141:in `block in create_command_and_execute' /Users/myuser/.rvm/gems/ruby-2.3.1/gems/sshkit-1.11.2/lib/sshkit/backends/abstract.rb:141:in `tap' /Users/myuser/.rvm/gems/ruby-2.3.1/gems/sshkit-1.11.2/lib/sshkit/backends/abstract.rb:141:in `create_command_and_execute' /Users/myuser/.rvm/gems/ruby-2.3.1/gems/sshkit-1.11.2/lib/sshkit/backends/abstract.rb:55:in `test' /Users/myuser/.rvm/gems/ruby-2.3.1/gems/capistrano-rvm-0.1.2/lib/capistrano/tasks/rvm.rake:21:in `block (3 levels) in <top (required)>' /Users/myuser/.rvm/gems/ruby-2.3.1/gems/sshkit-1.11.2/lib/sshkit/backends/abstract.rb:29:in `instance_exec' /Users/myuser/.rvm/gems/ruby-2.3.1/gems/sshkit-1.11.2/lib/sshkit/backends/abstract.rb:29:in `run' /Users/myuser/.rvm/gems/ruby-2.3.1/gems/sshkit-1.11.2/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute' Tasks: TOP => rvm:hook I've seen other issues talk about net-ssh version 2.8.0 being broken but I'm on 3.2.0 so wondering if anyone knows what the problem could be? On Friday, June 17, 2016 at 9:14:55 AM UTC-4, jaswinder wrote: > > Please restart your system first and then try for once. > > On Wednesday, April 2, 2014 at 5:45:53 PM UTC+5:30, John wrote: >> >> Versions: >> >> - Ruby: ruby 2.0.0p195 >> - Capistrano: 3.1.0 >> - Capistrano-rails: 1.1.1 >> - Rake: 10.2.2 >> - Rails: 4.1.0.rc2 >> >> Platform: >> >> - Working on: Ubuntu Linux >> - Deploying to: Ubuntu Linux >> >> Files: >> >> - Capfile >> >> require 'capistrano/setup' >> require 'capistrano/deploy' >> require 'capistrano/bundler' >> require 'capistrano/rails' >> require 'capistrano/rails/assets' >> require 'capistrano/rails/migrations' >> Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r } >> >> - deploy.rb >> >> lock '3.1.0' >> >> set :application, 'my application' >> >> # set :ssh_options, { >> # >> #} >> >> set :repo_url, '/home/deployer/my_app.git' >> set :branch, 'master' >> set :deploy_to, '/home/deployer' >> set :scm, :git >> set :rvm_type, :system >> set :pty, true >> set :linked_files, %w{config/database.yml config/secrets.yml} >> set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle >> public/system} >> set :keep_releases, 5 >> >> # The test task >> task :whoami do >> on roles(:all) do >> execute :whoami >> end >> end >> >> >> - Stage files (production.rb) >> >> server 'mydomain.com', user: 'deployer', roles: %w{web app db} >> >> >> =============================================================== >> >> The problem: >> >> I can ssh into my remote production server without any problems (using >> keys, not passsword), but apparently Capistrano 3 can't authenticate: When >> I execute the following simple test task >> >> task :whoami do >> on roles(:all) do >> execute :whoami >> end >> end >> >> >> ...I get... >> >> $ cap production whoami --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 whoami (first_time) >> ** Execute whoami >> INFO [fa727bad] Running /usr/bin/env whoami on mydomain.com >> DEBUG [fa727bad] Command: /usr/bin/env whoami >> cap aborted! >> Net::SSH::AuthenticationFailed: Authentication failed for user >> [email protected] >> /home/my_user/.rvm/gems/ruby-2.0.0-p195@rails3213/gems/net-ssh-2.8.0/lib/net/ssh.rb:217:in >> `start' >> /home/my_user/.rvm/gems/ruby-2.0.0-p195@rails3213/gems/sshkit-1.3.0/lib/sshkit/backends/connection_pool.rb:25:in >> `create_or_reuse_connection' >> /home/my_user/.rvm/gems/ruby-2.0.0-p195@rails3213/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:173:in >> `ssh' >> [...] >> >> What is wrong here? >> >> -- You received this message because you are subscribed to the Google Groups "Capistrano" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/1cf99eef-1b3c-487f-baf3-14a95786a086%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
