Capistrano 2.1 ssh/svn checkout problem

Hi,
I’m trying to deploy via Capistrano 2.1

I have the SVN repos. on the same deployed server.

In my deploy.rb:
I tried this
set :repository, “file:///home/#{user}/svn_repos/trunk”

This gives an error of:

  • executing `deploy:update_code’
    svn: Unable to open an ra_local session to URL
    svn: Unable to open repository ‘file:///…’

2nd attempt(where custom_ssh is defined in subversion’s config file
for setting a custom port ):
set :repository, “svn+custom_ssh://#{user}@#{domain}/home/#{user}/
svn_repos/trunk” # The repository location for svn+ssh access

this gives just locks up on:

  • executing “svn checkout -q -r241 svn+custom_ssh://SERVER”
    If i execute this command on a separate machine, it checks it out fine
    but if it try this command on the machine where the repos lies, it
    just freezes.

Has anyone else had this issue trying cap. deploy with the svn repos
on the same machine?

I would think the first attempt should work because if it is trying to
checkout from the same machine, the svn checkout file://… method
should be local.

Thanks
Tommy

The default deployment mechanism of Capistrano requires that the
repository be accessible both on the box you are deploying from (so
that the current revision can be queried) and on the boxes you are
deploying to (to check out the code there).

  • Jamis

right it is accessible, . the svn repos is on same machine as the
production.

On my local machine, it can query it fine and gets the version number
fine using this option:
set :repository, “svn+custom_ssh://#{user}@#{domain}/home/#{user}/
svn_repos/trunk” # The repository location for svn+ssh access

but when I do this, it locks up on this command when it tries to check
it out on the production machine:

  • executing “svn checkout -q -r241 svn+custom_ssh://SERVER”

Any ideas?

thanks,
tommy

t chheng wrote:

More clarification, this is the expected behavior I want it to do:

On my local machine, call `svn info file:///home/jobs/svn_repos/trunk
-rHEAD svn+custom_ssh://#{user}@#{domain}/home/#{user}/svn_repos/
trunk’ to get the current version.

When Capistrano logins into the production machine, call svn export -
q -r241 file:///home/#{user}/svn_repos/trunk /home/#{user}/apps/
#{app}/releases/20071217190026 && (echo 241 > /home/#{user}/apps/
#{app}/releases/20071217190026/REVISION)

These are the sets of commands can that run.
What it actually does:
When Capistrano logins into the production machine, it tries to do:
svn export -q -r241 svn+custom_ssh://#{user}@#{domain}/home/#{user}/
svn_repos/trunk /home/#{user}/apps/#{app}/releases/20071217190026 &&
(echo 241 > /home/#{user}/apps/#{app}/releases/20071217190026/
REVISION)

Which it fails because it is trying to ssh on the same machine.

Thanks,
Tommy

Tommy,
I am a bit further behind you and I wonder if you resolved this issue. I
too have the logical configuration where my svn repo is on the
deployment machine. I tried both the file:/// which logically should not
work becuase svn is relative to the local machine (windows) where I am
running capistrano and doing development. The svn+custom_ssh method also
fails though I did not see the problem of “…trying to ssh on the same
machine.” What happens here is that it simply is not recognising my
putty configuration file. So the svn+custom_ssh works for finding and
reading the repo but not saving files back.
any wisdom welcome
cheers

More clarification, this is the expected behavior I want it to do:

On my local machine, call `svn info file:///home/jobs/svn_repos/trunk
-rHEAD svn+custom_ssh://#{user}@#{domain}/home/#{user}/svn_repos/
trunk’ to get the current version.

When Capistrano logins into the production machine, call svn export -
q -r241 file:///home/#{user}/svn_repos/trunk /home/#{user}/apps/
#{app}/releases/20071217190026 && (echo 241 > /home/#{user}/apps/
#{app}/releases/20071217190026/REVISION)

These are the sets of commands can that run.
What it actually does:
When Capistrano logins into the production machine, it tries to do:
svn export -q -r241 svn+custom_ssh://#{user}@#{domain}/home/#{user}/
svn_repos/trunk /home/#{user}/apps/#{app}/releases/20071217190026 &&
(echo 241 > /home/#{user}/apps/#{app}/releases/20071217190026/
REVISION)

Which it fails because it is trying to ssh on the same machine.

Thanks,
Tommy

Hey,
Sorry but I wasn’t able to find a solution with capistrano. As a
workaround, I just used a simple bash script that runs all the
commands needed to deploy updates.
Let me know if you have any success.

Tommy

On Dec 22 2007, 12:29 pm, Gordon Tibbitts <ruby-forum-incom…@andreas-

t chheng wrote:

Hey,
Sorry but I wasn’t able to find a solution with capistrano. As a
workaround, I just used a simple bash script that runs all the
commands needed to deploy updates.
Let me know if you have any success.

Tommy

On Dec 22 2007, 12:29 pm, Gordon Tibbitts <ruby-forum-incom…@andreas-

Yes, That is exactly what I resorted to. I think that if I have a unix
to unix or Max(unix) to Linux(unix) configuration it probably would
work. Microsoft is the culprit here I think.
Cheers
Gordon