Error de Capistrano – Opciones inválidas: known_hosts

Estoy intentando configurar Capistrano como una testing de concepto para mis colegas en el trabajo en un proyecto secundario en el que estoy trabajando que tiene sus propios serveres.

Terminé de configurar todo y solo necesito ejecutar implementación por primera vez, el reenvío SSH está funcionando, etc. pero recibo un error que no había visto antes y no puedo encontrar ninguna reference a cómo resolver:

andrefigueira@Ubuntu ~/Code/dashboard $ cap slimqa01 deploy --trace ** Invoke slimqa01 (first_time) ** Execute slimqa01 ** Invoke load:defaults (first_time) ** Execute load:defaults ** Invoke deploy (first_time) ** Execute deploy ** Invoke deploy:starting (first_time) ** Execute deploy:starting ** Invoke deploy:check (first_time) ** Execute deploy:check ** Invoke git:check (first_time) ** Invoke git:wrapper (first_time) ** Execute git:wrapper 00:00 git:wrapper 01 mkdir -p /tmp/dashboard-capistrano/ cap aborted! ArgumentError: invalid option(s): known_hosts /usr/lib/ruby/vendor_ruby/net/ssh.rb:194:in `start' /var/lib/gems/2.3.0/gems/sshkit-1.11.0/lib/sshkit/backends/connection_pool.rb:59:in `call' /var/lib/gems/2.3.0/gems/sshkit-1.11.0/lib/sshkit/backends/connection_pool.rb:59:in `with' /var/lib/gems/2.3.0/gems/sshkit-1.11.0/lib/sshkit/backends/netssh.rb:149:in `with_ssh' /var/lib/gems/2.3.0/gems/sshkit-1.11.0/lib/sshkit/backends/netssh.rb:102:in `execute_command' /var/lib/gems/2.3.0/gems/sshkit-1.11.0/lib/sshkit/backends/abstract.rb:141:in `block in create_command_and_execute' /var/lib/gems/2.3.0/gems/sshkit-1.11.0/lib/sshkit/backends/abstract.rb:141:in `tap' /var/lib/gems/2.3.0/gems/sshkit-1.11.0/lib/sshkit/backends/abstract.rb:141:in `create_command_and_execute' /var/lib/gems/2.3.0/gems/sshkit-1.11.0/lib/sshkit/backends/abstract.rb:74:in `execute' /var/lib/gems/2.3.0/gems/capistrano-3.5.0/lib/capistrano/tasks/git.rake:16:in `block (3 levels) in <top (requinetworking)>' /var/lib/gems/2.3.0/gems/sshkit-1.11.0/lib/sshkit/backends/abstract.rb:29:in `instance_exec' /var/lib/gems/2.3.0/gems/sshkit-1.11.0/lib/sshkit/backends/abstract.rb:29:in `run' /var/lib/gems/2.3.0/gems/sshkit-1.11.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute' Tasks: TOP => git:check => git:wrapper The deploy has failed with an error: invalid option(s): known_hosts ** Invoke deploy:failed (first_time) ** Execute deploy:failed ** DEPLOY FAILED 

Así que creo que Capistrano está tratando de ejecutar algo con known_hosts como una opción, pero lo que está tratando de ejecutar no reconoce la opción y, por lo tanto, la implementación muere antes incluso de contactar al server, la falla ocurre casi de inmediato tan pronto cuando cap slimqa01 deploy Enter en la cap slimqa01 deploy .

¿Alguien tuvo un problema similar?

deploy.rb a continuación:

 # config valid only for current version of Capistrano lock '3.5.0' set :application, 'dashboard-capistrano' set :repo_url, 'git@github.com:private/repo.git' # Default branch is :master ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp # Default deploy_to directory is /var/www/my_app_name set :deploy_to, '/var/www/dashboard-capistrano' # Default value for :scm is :git set :scm, :git # Default value for :format is :airbrussh. set :format, :airbrussh # You can configure the Airbrussh format using :format_options. # These are the defaults. set :format_options, command_output: true, log_file: 'log/capistrano.log', color: :auto, truncate: :auto # Default value for :pty is false # set :pty, true # Default value for :linked_files is [] # set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml') # Default value for linked_dirs is [] # set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'public/system') # Default value for default_env is {} # set :default_env, { path: "/opt/ruby/bin:$PATH" } # Default value for keep_releases is 5 set :keep_releases, 5 set :ssh_options, { verbose: :debug } task :whoami do on roles(:web) do execute :whoami end end namespace :deploy do after :restart, :clear_cache do on roles(:web), in: :groups, limit: 3, wait: 10 do # Here we can do anything such as: # within release_path do # execute :rake, 'cache:clear' # end end end end 

También me sale el error solo al ejecutar tareas individuales:

 andrefigueira@Ubuntu ~/Code/dashboard $ cap slimqa01 whoami 00:00 whoami 01 whoami (Backtrace restricted to imported tasks) cap aborted! ArgumentError: invalid option(s): known_hosts Tasks: TOP => whoami (See full trace by running task with --trace) 

Tuve el mismo problema.
Después de actualizar net-ssh de 3.0.2 a 3.1.1, está funcionando.

gem update net-ssh