Topic: Problems with Capistrano on Dreamhost

I am trying to deploy a new app on Dreamhost with Capistrano, and I am running into a strange permissions problem that I can't figure out. 

When trying to sync the repository, it asks for a Password, and then fails with a Permission error.  I tried executing the git commands by hand on the remote server, and I don't have any sort of permissions errors. 

I am not very experienced with Capistrano, and have never tried it with Dreamhost before, so there might be something very obvious I'm missing here.


Here is the error I am getting:

  * executing "if [ -d /home/dtennant17/summitpush.dreamhosters.com/apps/scheduler/shared/cached-copy ]; then cd /home/dtennant17/summitpush.dreamhosters.com/apps/scheduler/shared/cached-copy && git fetch -q origin && git reset -q --hard e2f76fd0368c5c800406fb87521054bbbaab1bb2; else git clone -q dtennant17@summitpush.dreamhosters.com:git/scheduler.git /home/dtennant17/summitpush.dreamhosters.com/apps/scheduler/shared/cached-copy && cd /home/dtennant17/summitpush.dreamhosters.com/apps/scheduler/shared/cached-copy && git checkout -q -b deploy e2f76fd0368c5c800406fb87521054bbbaab1bb2; fi"
    servers: ["summitpush.dreamhosters.com"]
Password:
    [summitpush.dreamhosters.com] executing command
** [summitpush.dreamhosters.com :: err] Permission denied, please try again.
** [summitpush.dreamhosters.com :: err] Permission denied, please try again.
** [summitpush.dreamhosters.com :: err] Permission denied (publickey,password).
** [summitpush.dreamhosters.com :: err] fatal: The remote end hung up unexpectedly
    command finished

Here is what my deploy.rb file looks like:

set :user, 'dtennant17'
set :domain, 'summitpush.dreamhosters.com'

set :application, "scheduler"
set :repository,  "set your repository location here"

# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
# set :deploy_to, "/var/www/#{application}"
set :deploy_to, "/home/#{user}/#{domain}/apps/#{application}"
set :use_sudo, false

ssh_options[:keys] = %w(/home/dtennant17/.ssh/id_rsa)

# If you aren't using Subversion to manage your source code, specify
# your SCM below:
# set :scm, :subversion
set :scm, :git
set :repository, "#{user}@#{domain}:git/#{application}.git"
set :branch, "master"
set :deploy_via, :remote_cache

role :app, "#{domain}"
role :web, "#{domain}"
role :db,  "#{domain}", :primary => true

Re: Problems with Capistrano on Dreamhost

You were denied access via ssh.

Re: Problems with Capistrano on Dreamhost

In case anyone was wondering, I was able to fix this problem by adding the following line to my deploy.rb file.

default_run_options[:pty] = true

Without this it wasn't prompting me for the passphrase for my keys, and was just bailing out.

Re: Problems with Capistrano on Dreamhost

summitpush wrote:

In case anyone was wondering, I was able to fix this problem by adding the following line to my deploy.rb file.

Dude - thanks a lot for that tip! Had the exact same problem ;-)

/megl

Re: Problems with Capistrano on Dreamhost

" Cloud Hosting ? It seems like everyone is talking about the wonder of cloud hosting. UnlimitedGB.com hosting provider Introduced Cloud Hosting. great service and support.It is very happy to work with such a strong proponent like unlimitedgb.com now my site is working clearly. "