Reputation: 61
Just upgraded to the latest capistrano and my rails deployments are all printing this warning -
/home/vivek/.rvm/gems/ruby-2.4.1/gems/sshkit-1.14.0/lib/sshkit/backends/connection_pool.rb:59:in `call': Passing nil, or [nil] to Net::SSH.start is deprecated for keys: user
Everything seems to be working.
I upgraded from 3.5.0 to the current release (3.91.). Is there anything that needs to be changed in deploy.rb?
Upvotes: 2
Views: 1317
Reputation: 11102
When declaring your servers in e.g. config/deploy/production.rb
, make sure to explicitly set a username. My guess is that you don't have one specified, hence the warning.
For example:
server "example.com", user: "deploy", roles: %w[app web]
You can test that the username is being accepted by running:
$ cap production doctor:servers
Servers (1)
[email protected] [:app, :web]
The username for each server can also be overridden globally via :ssh_options
. If you set :ssh_options
, make sure those options don't include something like user: nil
.
You can inspect the value of :ssh_options
by running:
$ cap production doctor:variables
Upvotes: 7