Getting Subversion working remotely

I was having major problems getting Subversion to work when working remotely. After searching all over the place, I finally found a bunch of fixes that added together was my answer. So I am putting them here all here.

First, I am using the standard install of Fedora Core 4 with Apache 2 and Subversion from the ISO. (Of course you will need to make sure that you have Apache up and running.)

I created my repositories in the /var/www/svnproject directory, and I changed the owner of the directory and all subdirectories to be apache.apache. Then I changed permissions on the directory and subdirectories to drwxrwxr-x (or 775).

I created a repository by using this command:(creates fsfs type instead of Berkley)

svnadmin create --fs-type fsfs /var/www/svnproject

I don’t know if it was necessary to put the project into the /var/www folder or not, but I wanted to ensure that Apache could use it and this was the easiest way to ensure that.

Then I used commands on the directory created:

cd /var/www
chown -R apache.apache svnproject
chmod -R 775 svnprojects

Then I edited the file /etc/httpd/conf/httpd.conf by adding to the end of it:

DAV svn
SVNPath /var/www/svnproject
AuthType Basic
AuthName "My Subversion Repository"
AuthUserFile /var/www/auth-file-svn
Require valid-user

Notice that I am requiring SSL, so https will need to be typed at the beginning of the URL in order to connect remotely. This also encrypts all traffic as I am moving files, and authenticating.

Because I installed Subversion from the disk I did not need to add anything for LoadModule because the install handled all of that.

Next I needed to creat the file /var/www/auth-file-svn that I address in the httpd.conf. This file will contain usernames and passwords of the developers that I allow to use the repository. Here is how I did that:

htpasswd -cm /var/www/auth-file-svn username

Then follow the password prompts that follow.

To add additional names I used this:

htpasswd -m /var/www/auth-file-svn username

Then follow the password prompts that follow.

Now although I am a Linux fan, I find it easier to utilize Windows XP as a desktop operating system. This is because I like Dreamweaver and it just runs better on Windows. I also like TortoiseSVN as a Subversion client, and use it to checkout/commit/update projects on my local system from the repository. Now that the server is set up I can do this using the address:

Published by


Application Architect from Florida

Leave a Reply

Your email address will not be published. Required fields are marked *