Versions:

   - Ruby: 1.9.3
   - Capistrano: 2.13 and 2.14
   - Net-SSH 2.7.0 and 2.8.0

Platform:

   - Mac OS X 10.6.8
   - Deploying to... Ubuntu 12.04

Files:

   - Capfile
   
load 'deploy'
default_run_options[:pty] = true
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |
plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default 
tasks


   - deploy.rb

set :application, "myapp"
set :repository, "http://foo.bar.net/svn/myapp/trunk";
set :stages, %w(trunk staging production)
set :default_stage, 'trunk'

   - Stage files (production.rb, staging.rb)

role :web, "foo.bar.net" # Your HTTP server, Apache/etc
role :app, "foo.bar.net" # This may be the same as your `Web` server
role :db,  "foo.bar.net", :primary => true # This is where Rails migrations 
will run

set :deploy_to, "/var/www/#{application}/trunk"
set :rails_env, "trunk"

I have deployed this application numerous times successfully to all 
environments. In my other apps, I have been locking the capistrano gem to 
2.14 as we use subversion and there's a bug in 2.15 (and 3.x is obviously 
out) and I was making the pass on this one today. I was also doing some 
other things and emptied its gemset and re-installed it using bundle 
update. And then when I went to deploy, this (deploy:check in the example 
as it's a lot shorter):

$ cap deploy:check
    triggering load callbacks
    triggering start callbacks for `deploy:check'
  * 2014-02-03 16:34:28 executing `multistage:ensure'
*** Defaulting to `trunk'
  * 2014-02-03 16:34:28 executing `trunk'
  * 2014-02-03 16:34:28 executing `deploy:check'
  * executing "test -d /var/www/graphene/trunk/releases"
    servers: ["foo.bar.net"]
connection failed for: foo.bar.net (Net::SSH::AuthenticationFailed: 
Authentication failed for user [email protected])

Googling around I find that the likely cause is I 
need default_run_options[:pty] = true set, except, it is indeed set in my 
Capfile. (Tried in deploy.rb, also, just to be sure.) When I went to one of 
my other apps, they deployed fine. When I went to a tag of this app that I 
just recently deployed, it also deployed fine. On looking at the gem list, 
I saw the problematic app had was using net-ssh (2.8.0) the happy app was 
using net-ssh (2.7.0). Seeing as net-ssh was mentioned explicitly in the 
error, I uninstalled 2.8 and installed 2.7, and sure enough I got the 
expected password prompt when carrying out a deploy.

So this is not so much a question as an observation that could possibly 
help someone else who is scratching their head.


-- 
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 [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/66ccf94f-4bf9-4f65-ad1e-cec0cc4318ab%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to