• Tweet

subversionlogo 384x332 300x259 Setting Up SVN Repo on Ubuntu ServerIn our last post we have seen how we can easily setup a SVN server on Ubuntu. In this post we shall see how we can create SVN repos and configure them.

To create and manage svn repos, we shall use the svn admin tool. Let’s say you want your repository to be in /var/svn/repos, type in these commands:

cd /var
sudo mkdir svn
sudo svnadmin create /var/svn/repos
1
We now add an user for the svn repository.  Use this command:
1
sudo adduser svn

Change the ownership of the repo using this command:

sudo chown -R svn.svn svn

If you want anybody else to access (and manage) the svn repos, you have to add them to the svn group. Use this command to accomplish that:

sudo vigr

Go to the end of the file and add your user name to the end of the line which starts svn. The end of the file should look similar to this:

admin:x:110:masnun
svn:x:1001:masnun

The clients will be using SSH to connect to the server. For that we need to setup openSSH server.

sudo apt-get install openssh-server

After the installation is complete, the svn repos can be accessed using the ssh+svn protocol like this:

svn co svn+ssh://username@machinename/var/svn/repos

We are done for now. The users can access the repo, check out working copies and make commits. In our next post we shall see more configuration options.