Receiving Net::SSH::AuthenticationFailed error when deploying

909 views
Skip to first unread message

Red Hot Chili Pepper

unread,
Dec 11, 2013, 3:24:33 AM12/11/13
to capis...@googlegroups.com
When I try to do a deploy I run into the following error

admin@cap-test3:/root$ cap ui-staging deploy
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
 INFO [9e030fda] Running /usr/bin/env mkdir -p /tmp/ui/ on 10.209.130.133
DEBUG [9e030fda] Command: /usr/bin/env mkdir -p /tmp/ui/
cap aborted!
Net::SSH::AuthenticationFailed
/var/lib/gems/1.9.1/gems/net-ssh-2.7.0/lib/net/ssh.rb:215:in `start'
/var/lib/gems/1.9.1/gems/sshkit-1.2.0/lib/sshkit/backends/netssh.rb:169:in `ssh'
/var/lib/gems/1.9.1/gems/sshkit-1.2.0/lib/sshkit/backends/netssh.rb:122:in `block in _execute'
/var/lib/gems/1.9.1/gems/sshkit-1.2.0/lib/sshkit/backends/netssh.rb:119:in `tap'
/var/lib/gems/1.9.1/gems/sshkit-1.2.0/lib/sshkit/backends/netssh.rb:119:in `_execute'
/var/lib/gems/1.9.1/gems/sshkit-1.2.0/lib/sshkit/backends/netssh.rb:66:in `execute'
/var/lib/gems/1.9.1/gems/capistrano-3.0.1/lib/capistrano/tasks/git.rake:13:in `block (3 levels) in <top (required)>'
/var/lib/gems/1.9.1/gems/sshkit-1.2.0/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/var/lib/gems/1.9.1/gems/sshkit-1.2.0/lib/sshkit/backends/netssh.rb:54:in `run'
/var/lib/gems/1.9.1/gems/sshkit-1.2.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => git:check => git:wrapper
(See full trace by running task with --trace)

I am able to ssh from my capistrano server to the server I am deploying to and visa versa.  I am able to list the files on the remote server using git ls-remote from both boxes (hence pub key auth is working.)  I am not sure why I am getting an Net::SSH::AuthenticationFailed error.

Here is some additional information

admin@cap-test3:/root$ ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
admin@cap-test3:/root$ cap --version
Capistrano Version: 3.0.1 (Rake Version: 10.1.0)

Capfile
require 'capistrano/setup'
require 'capistrano/deploy'
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }

deploy.rb
set :stages, %w(ui-staging ui-prod)
set :default_stage, "ui-staging"

set :application, "ui"
set :deploy_to, '/home/admin/'

set :scm, :git
set :repository,  "g...@github.com:myrepo.git"
set :branch, "master"

set :use_sudo, false
set :user, 'admin'

set :keep_releases, 2
after "deploy", "deploy:cleanup"

config/deploy/ui-staging.rb
set :deploy_via, :checkout
server "10.209.130.133", roles: [:web]

Lee Hambley

unread,
Dec 11, 2013, 7:31:13 AM12/11/13
to capistrano
Please try and check your Capfile. You've mixed up a lot of syntax from v2 and v3 in there. (at least, it's now called repo_url, not repository.)

At least you might try server "ad...@10.209.130.133", roles: [:web]. (although set :user, 'admin' should work afaik)

--
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+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/0e6ac0ab-06a9-42b1-84fd-271ae8939786%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages