Creating and accessing SVN repositories over HTTP
11 May 2008
Creating and accessing SVN repositories over HTTP
To network your repository over HTTP, you basically need some components, the apache server running in your system and also mod_dav_svn.
To get the mod_dav_svn:
$ yum install mod_dav_svn.i386
To create the repository in which it will hold your projects:
$ svnadmin create /home/work/svn/project1/
then create the folder that holds your project.
Open the httpd.conf and add the following lines of code:
<Location /svn>
DAV svn
SVNParentPath /home/work/svn/project1/
AuthType Basic
AuthName “Subversion Repository Authentication”
AuthUserFile /home/work/svn/project1/-auth-file
Require valid-user
</Location>
Switch to the terminal and add the following commands in order to grant access to specific users only and not anonymously:
$ htpasswd -cm /home/work/svn/project1/-auth-file harry
[password] : *********
[Retype – password] : *********
$ htpasswd /home/work/svn/project1-auth-file -m sally
New password: *******
Re-type new password: *******
Adding password for user sally
$
Start apache server
$ /etc/init.d/httpd start
Change the folder permission to allow the apache user to read and write in the repository:
$ chown apache.apache -R /home/work/svn/
Switch to eclipse to access your project remotely through http:
Windows – > Show Perspective – > Other – > SVN
In the SVN windows:
New Repository location -> [Enter URL] it should be http://127.0.0.1/svn/project1
Enter your username and password associated in the authorization file.
Right Click -> Check out repository.
Enjoy
Hope to hear from you.
Entry Filed under: Linux. Tags: apache, Eclipse, Fedora, HTTP, java, Linux, Subclipse, SVN, svnadmin, ubuntu.
Trackback this post | Subscribe to the comments via RSS Feed