Second try - Permission denied issues

665 views
Skip to first unread message

Mike

unread,
Dec 13, 2007, 8:21:24 PM12/13/07
to Capistrano
Hey folks -

I'm pulling my hair out trying to figure out how to deploy without
getign Permission denied errors.

I've downgraded to Cap 2.0 and had the same issues, so I'm back
troubleshooting on Cap 2.1

Here's the output of my cap deploy

mike-oristians-computer:~/Documents/Development/tagweb mosofoco$ cap
staging deploy
* executing "ls -x /home/rails/staging/releases"
servers: ["telseygroup.com"]
Password:
[telseygroup.com] executing command
command finished
* executing `staging'
triggering start callbacks for `deploy'
* executing `multistage:ensure'
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
* executing "svn export -q -r1126 svn+ssh://telseygroup.com/home/
svn/repositories/dev.telseygroup.com/branches/tagweb /home/rails/
staging/releases/20071214010634 && (echo 1126 > /home/rails/staging/
releases/20071214010634/REVISION)"
servers: ["telseygroup.com"]
[telseygroup.com] executing command
** [err] Permission denied, please try again.
** [err] Permission denied, please try again.
** [err] Permission denied (publickey,password,keyboard-interactive).
** [err] svn: Connection closed unexpectedly
command finished
*** [deploy:update_code] rolling back
* executing "rm -rf /home/rails/staging/releases/20071214010634;
true"
servers: ["telseygroup.com"]
[telseygroup.com] executing command
command finished
command "svn export -q -r1126 svn+ssh://telseygroup.com/home/svn/
repositories/dev.telseygroup.com/branches/tagweb /home/rails/staging/
releases/20071214010634 && (echo 1126 > /home/rails/staging/releases/
20071214010634/REVISION)" failed on telseygroup.com

and here's my deploy.rb

require 'mongrel_cluster/recipes'
require 'yaml'
require 'capistrano/recipes/deploy/scm'
require 'capistrano/recipes/deploy/strategy'
set :stages, %w(staging production)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
set :application, "tagweb"
#set :scm, :subversion
set :deploy_via, :export
set :user, "rails"

#
=============================================================================
# ROLES
#
=============================================================================
# You can define any number of roles, each of which contains any
number of
# machines. Roles might include such things as :web, or :app, or :db,
defining
# what the purpose of each machine is. You can also specify options
that can
# be used to single out a specific subset of boxes in a particular
role, like
# :primary => true.

role :web, "telseygroup.com"
role :app, "telseygroup.com"
role :db, "telseygroup.com", :primary => true

#
=============================================================================
# OPTIONAL VARIABLES
#
=============================================================================

#set :user, "rails"
set :checkout, "export" # Use export, not checkout. Deployed
copies don't need working copies

# set :scm, :darcs # defaults to :subversion
# set :svn, "/path/to/svn" # defaults to searching the PATH
# set :darcs, "/path/to/darcs" # defaults to searching the PATH
# set :cvs, "/path/to/cvs" # defaults to searching the PATH
# set :gateway, "gate.host.com" # default to no gateway

#
=============================================================================
# SSH OPTIONS
#
=============================================================================
#ssh_options[:keys] = %w(/Users/mosofoco/.ssh/id_dsa)
#ssh_options[:port] = 22
#ssh_options[:forward_agent] = true
#ssh_options[:auth_methods] = %w(password keyboard-interactive)

# TASKS
#
============================================================================

set :repository, "svn+ssh://telseygroup.com/home/svn/repositories/
dev.telseygroup.com/branches/tagweb"
#set (:deploy_to) {"/home/rails/#{stage}"}
set :deploy_to, "/home/rails/staging"
set :mongrel_conf, "#{current_release}/config/
mongrel_cluster.yml.staging"
set :database_conf, "#{current_release}/config/database.yml.staging"


namespace :deploy do
task :start, :roles => :app do
sudo '/etc/init.d/mongrel-staging start'
end

task :stop, :roles => :app do
sudo '/etc/init.d/mongrel-staging stop'
end

task :restart, :roles => :app do
sudo '/etc/init.d/mongrel-staging stop'
sudo '/etc/init.d/mongrel-staging start'
end

after "deploy:update_code", :link_db, :link_mong
after "deploy", :symlink_ftp_assets, :symlink_file_column_assets
end


I cant figure out what's going wrong, as this has been working
consistently for the past 9 months, and it's even worked with Cap 2.0
before. Any help is much appreciated.

Thanks,

Mike

Mike

unread,
Dec 13, 2007, 9:56:40 PM12/13/07
to Capistrano
default_run_options[:pty] = true

seems to have solved my problem ... fyi

Cheers,

Mike

Akhil

unread,
Dec 14, 2007, 11:57:23 AM12/14/07
to Capistrano
Hi,

Uncommenting or putting "ssh_options[:auth_methods] = %w(password
keyboard-interactive) " could also solve this problem.


i
Reply all
Reply to author
Forward
0 new messages