To add SVN repositories and give existing user accounts access to it is not entirely a one step process in Ubuntu. So this is how you do it…
First, browse to the folder in which you want to generate your SVN repository and create the respository folder:
cd /home/svn
mkdir projectname
Next, instruct SVN to generate the necessary file structures required into your repository folder:
sudo svnadmin create projectname
Once this has completed, the next step is to open up the repository to the world by making use of the Apache web server. To do this, we need to assign the necessary folder access permissions:
sudo chown -R www-data:svn projectname
sudo chmod -R g+rws projectname
Next, we need to add the new SVN repository details under Apache’s configuration:
sudo nano /etc/apache2/mods-available/dav_svn.conf
Add to the bottom of the file:
DAV svn SVNPath /home/svn/projectname AuthType Basic AuthName "Projectname SVN Repository" AuthUserFile /etc/subversion/passwd Require valid-user
Note the
And finally? Restart the Apache service.
sudo /etc/init.d/apache2 restart
To give existing user accounts access to the SVN repository, you need to add them to the subversion password file:
sudo /etc/subversion/passwd passwd username
(You will be prompted to enter a password)
Done!
You might also enjoy:
-
As a web developer I need to juggle a number of projects on my development machine all at once. The simple way to get around accessing these various sites i ...
-
A lot of the time, in order to quickly enable SSL for Apache in Ubuntu, servers make use of a self-signed certificates. These are pretty useful, though they ...
-
MySQL gets installed with a default root account under the username "root". Sometimes the system will allow you to install a root account without a password ...
-
PHPMyAdmin is a useful web-based management tool for your MySQL server running as part of your LAMP stack. To install this tool in Ubuntu turns out to be pr ...
-
Sometimes you make subtle changes to the configuration files of Apache, affecting certain aspects of the server's performance but not others. To get these c ...