Capistrano series - setting up subversion

So now the Slice is setup and ready for our Ruby on Rails with Capistrano stack.

Let's get straight on and install subversion and set up a repository with SSH access.

Sounds familiar - again

it's true. There is a complete subversion section to the site.

What we're going to do is create a subversion repository in our home directory and configure it so we can access it via SSH.

This will make the connection nice and secure and we won't have to worry about passwords, etc as we have already set up SSH to accept passwordless logins via our private and public SSH keys (see the Slice setup article for more details).

Creating a repository

I'm not going to go through the details of setting up a repository but just show the commands. I'll link to the relevant subversion article if you want to know more (recommended reading).

So log into your Slice and install subversion:

sudo aptitude install subversion

Next create a repo directory and create a project:

mkdir /home/demo/repository
svnadmin create /home/demo/repository/project1

SSH access

Next thing is to sort out SSH access to the repository (keeping in mind we changed the SSH port during the setup phase).

Easiest thing here is to follow the subversion and SSH article.

Once you have created your custom 'tunnel' you should be able to check out project1, to your workstation, with something like this:

svn co svn+project1ssh://

Using the custom 'svn+project1ssh' will ensure the correct username is used and the it connects to the correct SSH port.


Now you have a folder called project1 on your workstation ready for the next phase of the installation.

Good start.

I also hope you are seeing the benefit of the command line: Once you get used to it, it's sleek and simple.

The next article will see the setup taking real shape when we install Ruby, rubygems, Nginx and sqlite3.


Article Comments:

Kyle commented Wed Mar 19 17:31:21 UTC 2008:

When I tried running the last command, I got an error:

svn: 'project1' is already a working copy for a different URL

I was able to check it out after removing the project1 directory on my local machine.

Kyle commented Wed Mar 19 17:32:50 UTC 2008:

Oops! Ignore that. Too many tabs open...

divya commented Sat Jun 28 05:30:28 UTC 2008:

Can you please explain how to set up custom 'tunnel' , because I'm getting an error svn: Undefined tunnel scheme 'project1ssh'

Pete commented Fri Jul 25 07:17:33 UTC 2008:

i got the following error while creating a repository. what does it mean?

svnadmin: warning: cannot set LC_CTYPE locale svnadmin: warning: environment variable LANG is en_US.UTF-8 svnadmin: warning: please check that your locale name is correct svnadmin: Repository creation failed svnadmin: Could not create top-level directory svnadmin: Can't create directory '/repository/pfvsa': No such file or directory

Want to comment?

(not made public)


(use plain text or Markdown syntax)