How to Make Subversion via HTTP work with RailsMachine (and Capistrano)

Last night I setup my site on RailsMachine. Overall, it was a very pleasant experience. One bugaboo that I ran into:

I have my Subversion repository setup using http, not svn+ssh. The repository is hosted at Joyent and I don't recall why I set it up this way, but there must have been a reason.

Anyhoo...so, I'm plugging away with RailsMachine and using Capistrano for the first time and it's all pretty sweet, except for I can't seem to access my svn repository. Cap would reach the point in the script where it made the HTTP request and I would see the HTTP authentication, but I had no way to type in my user/pass combo, and it would fail.

Long story short: RailsMachine requires that you run Cap using a user called "deploy", and those are the credentials that Cap passes via HTTP Authentication to the svn repository. So, I was able to get it to work by simply creating a user for my svn repository called "deploy" with the same password as "deploy" on my RailsMachine server. Everything works fine now!

2 comments:

Rob said...

You can make Capistrano send a different username by adding this to your deploy.rb:

set :svn_username, 'user'
set :svn_password, 'password'

-Rob (at Rails Machine)

Hemali- Gadget Freak said...

Hi ! thanks....

Its really an amazing post by you...