« Fixing “Error: window.location.refresh is not a function” | Home | Setting up a HTTP Gateway on Ubuntu 10.04 »
Setting up a Subversion server using Apache on Ubuntu
By admin | August 9, 2010
Subversion is an excellent open-source solution for keeping track of the different versions while developing software. Here, we will see how to set up a subversion server on an Ubuntu 10.04 LTS Server to provide programmers with the ability to use Subversion.
Prerequisities
Apache 2 should have already been installed and configured with SSL – if not, see the Ubuntu Server Guide for more details. Install the packages subversion and libapache2-svn:
sudo apt-get install subversion libapache2-svn
Setting up
- Create a home for the Subversion files:
sudo mkdir -p /var/svn
- Open up /etc/apache2/mods-available/dav_svn.conf in your favourite text editor of choice, and add the following text at the bottom (ignore anything already there):
<Location /svn> DAV svn SVNParentPath /var/svn SVNListParentPath On AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/subversion/passwd <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location>
- Add a user to the Subversion – if you don’t, you may end up with strange errors like “svn: Server sent unexpected return value (500 Internal Server Error) in response to MKACTIVITY request” when trying to commit.
sudo htpasswd -c /etc/subversion/passwd admin
It will prompt for a password – just give it something.
- You’re good to go – although without any projects the server won’t have anything to commit to. Add a project to the server:
sudo mkdir -p /var/svn/project sudo svnadmin create /var/svn/project
Results/Errors
svn commit -m nomsg test1 test2 --username=root --password=top_secret_root_password_here
svn: Commit failed (details follow): svn: Server sent unexpected return value (500 Internal Server Error) in response to MKACTIVITY request for '/svn/project/!svn/act/53aca034-c64b-5b41-8bf4- 2715d91af049'
This error is because you do not have a valid login passed to the server, although it could use a much, much more descriptive message than “Internal Server Error”. Remember the login is not the Unix login, but instead the login created with htpassed.
svn commit -m nomsg test01 test02 --user name=admin --password=password_createdby_htpasswd_here
Adding test01 Adding test02 Committed revision 1.
If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!
Topics: HTTP (Internet), Linux | 25 Comments »
November 25th, 2010 at 03:57
is its posible to view the source browser?
like http://localhost/svn:8433
May 20th, 2011 at 11:57
This may seem obvious, but somehow I overlooked it during the setup of the repo. If you’re creating that /etc/svn/passwd file for the first time as root, then you need to alter the ownership as well:
chown -R www-data:subversion /etc/svn
If you do not, then you get the same 500 error as described above since the web server cannot authenticate the user.
I hope this helps others as well.
May 1st, 2022 at 19:20
… [Trackback]
[…] Information to that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
June 4th, 2022 at 11:35
… [Trackback]
[…] Read More Info here on that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
June 17th, 2022 at 13:22
… [Trackback]
[…] Read More on on that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
June 26th, 2022 at 06:32
… [Trackback]
[…] Find More here to that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
July 4th, 2022 at 09:41
… [Trackback]
[…] Find More on that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
July 14th, 2022 at 20:59
… [Trackback]
[…] Find More Info here on that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
July 14th, 2022 at 21:47
… [Trackback]
[…] Read More Information here on that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
July 18th, 2022 at 19:38
… [Trackback]
[…] Find More on that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
August 9th, 2022 at 10:16
… [Trackback]
[…] Read More Info here to that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
August 26th, 2022 at 11:02
… [Trackback]
[…] Here you can find 45810 more Info on that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
August 27th, 2022 at 01:25
… [Trackback]
[…] Read More on that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
August 29th, 2022 at 21:40
… [Trackback]
[…] Read More on to that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
September 8th, 2022 at 12:26
… [Trackback]
[…] Read More to that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
October 5th, 2022 at 18:09
… [Trackback]
[…] Read More on on that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
October 19th, 2022 at 08:58
… [Trackback]
[…] Information on that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
October 30th, 2022 at 00:05
… [Trackback]
[…] Read More here to that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
December 6th, 2022 at 18:25
… [Trackback]
[…] There you will find 44272 additional Info on that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
January 14th, 2023 at 13:46
… [Trackback]
[…] Read More Info here to that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
January 31st, 2023 at 15:20
… [Trackback]
[…] Info to that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
March 9th, 2023 at 17:18
… [Trackback]
[…] Find More Information here on that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
March 9th, 2023 at 22:54
… [Trackback]
[…] Read More Info here to that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
March 21st, 2023 at 06:29
… [Trackback]
[…] Read More here to that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]
March 28th, 2023 at 06:08
… [Trackback]
[…] Read More on that Topic: compdigitec.com/labs/2010/08/09/setting-up-a-subversion-server-using-apache-on-ubuntu/ […]