Rants and Ruminations

Subversion authentication
28 Apr 05 - http://ruminations.willemvandenende.com/rublog/rublog.cgi/SysAdmin/SubversionAuthentication.rdoc
I’m pairprogramming with Rob Westgeest today, in preparation for the eXperience Agile course. I wanted to geve him access to subversion on my webserver in the simplest possible way. As the subversion book explains, svnserve is well suited for that. Before that, I tried svn+ssh, but I got stuck in the mud of unix permissions trying to share the repository. With ssh it is also more work to add users - svnserve doesn’t require unix accounts for additional users.

In hindsight, creating a repository is quite straightforward. I decided to create a special svn user and group, so svnserve doesn’t have to run as root. With -r we can restrict the places where repositories can be, which also makes it easier for clients to specify urls.

  su -c "svnserve -d -r /var/repositories/"  svn

To access the reposotory remotely was easy,

  svn checkout svn://willemvandenende.com/svn/project

Only problem: the checkout is read only by default. Checking out read-write I wanted to do with authentication. Two things are needed for that:

so a working checkout looks like this,

  svn checkout svn://willemvandenende.com/svn/project --username willem