Hello @all!

I'm trying to setup Capistrano since September but I did not get it to
work until now.

Here is my environment:

Windows 7,
SVN repository,
Capistrano 2.5.19,
Ruby 1.8.7,
Rails 2.3.5.

The command cap deploy:check works fine. The step cap deploy:setup
works, too, as all directories are created on the remote server.

I have created a public and a private key on my Windows machine. The
private key is inserted in my pageant and the public key is on the
remote server in the file /.ssh/authorized_keys

But executing cap deploy leads to one of the following error messages:

1. Pageant is running with inserted key:

C:\Users\Marc Bungart\websites\domain>cap deploy
  * executing `deploy'
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
    executing locally: "svn info svn+ssh://domain.com/www/domain.com/
websites/domain/svn --username ssh-user --password password --no-auth-
cache  -rHEAD"
  * executing "svn checkout -q --username ssh-user --password password
--no-auth-cache  -r8 svn+ssh://domain.com/www/domain.com/websites/
domain/svn /www/domain.com/websites/domain/releases/20101205193545 &&
(echo 8 > /www/domain.com/websites/domain/releases/20101205193545/
REVISION)"
    servers: ["domain.com"]
*** [deploy:update_code] rolling back
  * executing "rm -rf /www/domain.com/websites/domain/releases/
20101205193545; true"
    servers: ["domain.com"]
 ** [deploy:update_code] exception while rolling back:
Capistrano::ConnectionError, connection failed for: domain.com
(Net::SSH::Authentication::AgentError: unknown response from agent: 1,
"\000\000\000.\001\000\000\000)SSH-2.0-Ruby/Net::SSH_2.0.23 i386-
mingw32") connection failed for: domain.com
(Net::SSH::Authentication::AgentError: unknown response from agent: 1,
"\000\000\000.\001\000\000\000)SSH-2.0-Ruby/Net::SSH_2.0.23 i386-
mingw32")

In general pageant seems to work as I can login to the remote server
with putty (and plink) without typing the password.

2. Pageant is not running:

C:\Users\Marc Bungart\websites\domain>cap deploy
  * executing `deploy'
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
    executing locally: "svn info svn+ssh://domain.com/www/domain.com/
websites/domain/svn --username ssh-user --password password --no-auth-
cache  -rHEAD"
  * executing "svn checkout -q --username ssh-user --password password
--no-auth-cache  -r8 svn+ssh://domain.com/www/domain.com/websites/
domain/svn /www/domain.com/websites/domain/releases/20101205193357 &&
(echo 8 > /www/domain.com/websites/domain/releases/20101205193357/
REVISION)"
    servers: ["domain.com"]
    [domain.com] executing command
 ** [domain.com :: err] svn: To better debug SSH connection problems,
remove the -q option from 'ssh' in the [tunnels] section of your
Subversion configuration file.
 ** svn: Network connection closed unexpectedly
    command finished
*** [deploy:update_code] rolling back
  * executing "rm -rf /www/domain.com/websites/domain/releases/
20101205193357; true"
    servers: ["domain.com"]
    [domain.com] executing command
    command finished
failed: "sh -c 'svn checkout -q --username ssh-user --password
password --no-auth-cache  -r8 svn+ssh://domain.com/www/domain.com/
websites/domain/svn /www/domain.com/websites/domain/releases/
20101205193357 && (echo 8 > /www/domain.com/websites/domain/releases/
20101205193357/REVISION)'" on domain.com

It seems that something with the SSH connections doesn't work. Here is
my line in the tunnel section of the subversion config file:

ssh=C:/Putty/plink.exe -l <username> -i C:/Putty/
ssh_private_20101103.ppk

Here is my current deploy.rb. There are some lines I commented out for
testing purposes:

# default_run_options[:pty] = true
set :use_sudo, false

set :application, "domain"
# set :domain, "domain.com"
set :rails_env, :production
set :deploy_to, "/www/domain.com/websites/domain"
# set :deploy_via, :copy

set :user, "ssh-user"
set :password, "password"

set :repository,  "svn+ssh://[email protected]/www/domain.com/
websites/domain/svn"
set :scm, :subversion
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`,
`perforce`, `subversion` or `none`
set :scm_username, "ssh-user"
set :scm_password, "password"
# set :scm_password, proc{Capistrano::CLI.password_prompt('SVN
password: ')}

# ssh_options[:port] = '22'
# set :ssh_options, { :forward_agent => true }

# ssh_options[:verbose] = :debug

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

# If you are using Passenger mod_rails uncomment this:
# if you're still using the script/reapear helper you will need
# these http://github.com/rails/irs_process_scripts

namespace :deploy do
   task :start do ; end
   task :stop do ; end
   task :restart, :roles => :app, :except => { :no_release => true }
do
     run "#{try_sudo} touch
#{File.join(current_path,'tmp','restart.txt')}"
   end
end

I hope that someone can give me a hint. I'm really working on this
since September and it's quite frustrating.

Thanks in advance and kind regards
Marc

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to