No se puede ejecutar la implementación de producción de mayúsculas: inicial con Net :: SSH :: AutenticaciónFailed: ¿Error de authentication para el usuario?

Traté de implementar mi aplicación de Rails desde mi mac en el server en océano digital (usando github).

Entonces cuando ejecuté la cap production deploy:initial por cap production deploy:initial obtuve este 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 rvm:hook (first_time) ** Execute rvm:hook cap aborted! Net::SSH::AuthenticationFailed: Authentication failed for user deploy@myip /Users/manjarb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh.rb:250:in `start' /Users/manjarb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/connection_pool.rb:59:in `call' /Users/manjarb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/connection_pool.rb:59:in `with' /Users/manjarb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/netssh.rb:155:in `with_ssh' /Users/manjarb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/netssh.rb:108:in `execute_command' /Users/manjarb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:141:in `block in create_command_and_execute' /Users/manjarb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:141:in `tap' /Users/manjarb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:141:in `create_command_and_execute' /Users/manjarb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:55:in `test' /Users/manjarb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/capistrano-rvm-0.1.2/lib/capistrano/tasks/rvm.rake:21:in `block (3 levels) in <top (requinetworking)>' /Users/manjarb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:29:in `instance_exec' /Users/manjarb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:29:in `run' /Users/manjarb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute' 

Pero ya agregué mi server id_rsa.pub al depósito Implementar key. Y cuando pruebo clonando mi repository desde la key ssh, funciona bien sin ningún problema.

este es mi deploy.rb

 # config valid only for current version of Capistrano lock "3.7.1" set :repo_url, 'git@github.com:myrepo.git' set :application, 'appname' set :user, 'deploy' set :puma_threads, [4, 16] set :puma_workers, 0 # Don't change these unless you know what you're doing set :pty, true set :use_sudo, false set :stage, :production set :deploy_via, :remote_cache set :deploy_to, "/home/#{fetch(:user)}/apps/#{fetch(:application)}" set :puma_bind, "unix://#{shanetworking_path}/tmp/sockets/#{fetch(:application)}-puma.sock" set :puma_state, "#{shanetworking_path}/tmp/pids/puma.state" set :puma_pid, "#{shanetworking_path}/tmp/pids/puma.pid" set :puma_access_log, "#{release_path}/log/puma.error.log" set :puma_error_log, "#{release_path}/log/puma.access.log" set :ssh_options, { forward_agent: true, user: fetch(:user), keys: %w(~/.ssh/id_rsa.pub) } set :puma_preload_app, true set :puma_worker_timeout, nil set :puma_init_active_record, true # Change to false when not using ActiveRecord namespace :puma do desc 'Create Directories for Puma Pids and Socket' task :make_dirs do on roles(:app) do execute "mkdir #{shanetworking_path}/tmp/sockets -p" execute "mkdir #{shanetworking_path}/tmp/pids -p" end end before :start, :make_dirs end namespace :deploy do desc "Make sure local git is in sync with remote." task :check_revision do on roles(:app) do unless `git rev-parse HEAD` == `git rev-parse origin/master` puts "WARNING: HEAD is not the same as origin/master" puts "Run `git push` to sync changes." exit end end end desc 'Initial Deploy' task :initial do on roles(:app) do before 'deploy:restart', 'puma:start' invoke 'deploy' end end desc 'Restart application' task :restart do on roles(:app), in: :sequence, wait: 5 do invoke 'puma:restart' end end before :starting, :check_revision after :finishing, :cleanup end 

Entonces, ¿cómo puedo solucionar esto?

¡Gracias!

No soy un usuario de Ruby o Capistrano, pero:

 set :ssh_options, { ..., keys: %w(~/.ssh/id_rsa.pub) } ^^^^^^^^^^ 

Debe especificar el file de key privada aquí, no el file de key pública. El file de key privada es probablemente "~ / .ssh / id_rsa" sin la extensión ".pub".