I set about setting up a svn repository on the server and my god was it hard. Let me clarify what I was trying to do.
I want a svn repository on the server so that it was accessible online. Idealy it would use the SVN + WebDav module so it could be accessible using a web browser. Also I wanted an alternative access point either using the SVN protocol.
I dug around on the internet for some articles and installing SVN was easy using the apt-get method.
sudo apt-get install subversion subversion-tools libapache2-svn
Then I create a new user group called subversion and added my account and the www-data (apache) to the group. The group will be used to set permissions for the svn directory / repository
Create the
chmod -R www-data:subversion mySVNdir
Now it’s time to configure the WevDav config file. This is located at:
/etc/apache2/mods-enabled/dav_svn.conf
Inside the configuration file make sure it has all of these directives:
DAV svn
SVNPath /home/svn/myproject
AuthType Basic
AuthName "myproject subversion repository"
AuthUserFile /etc/subversion/passwd
Require valid-user
The “Require valid-user” is optional and requires the user to enter a username and password authentication before allowing the user to access the repository.
Restart the apache server
sudo /etc/init.d/apache2 restart
Next is to create a username and password to access the svn repository:
sudo htpasswd -c /etc/subversion/passwd danny
replace “danny” with the username. The shell should ask you to create a password and confirm it. Now it should be up and running but I seem to have a problem saying “Could not open the requested SVN filesystem” when I go to it via http. I’m sure the file permissions are o.k because the chown and chmod it after I created my repository.
It connects using svn+ssh:// using the username and password I created with htpasswd.