Did you correctly read and follow http://capistranorb.com/documentation/getting-started/authentication-and-authorisation/?
Lee Hambley -- http://lee.hambley.name/ +49 (0) 170 298 5667 On 2 April 2014 14:15, John <peter.win...@gmail.com> 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 > deplo...@mydomain.com > /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 capistrano+unsubscr...@googlegroups.com. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/capistrano/f0a4e2df-fa7f-4157-97b0-002cc36410f5%40googlegroups.com<https://groups.google.com/d/msgid/capistrano/f0a4e2df-fa7f-4157-97b0-002cc36410f5%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 capistrano+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/CAN_%2BVLVuxtJ7aoS4dx4rcD5A4ZUFnmvn7JV-xFebuYN92OBKVA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.