Subversion Server

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search

SVN is running on gourd, the repositories are stored in /home/svn/. Any user can checkout a svn project, but only users who are a part of the 'svn' group can commit updates to the svn server. If needed we can also create users for certain projects without giving them an LDAP username.

Subversion Service through Xinetd

The subversion service runs under xinetd. Its configuration is located in /etc/xinetd.d/svn

/etc/xinetd.d/svn

service svn
{ 
	port        = 3690
	socket_type = stream
	protocol    = tcp
	wait        = no
	user        = svn
	server      = /usr/bin/svnserve
	server_args = -i -r /home/svn
	disable     = no
}

User Authentication

There are two ways that you can give users the ability to commit and checkout projects. One is just making sure that the user in LDAP is a part of the 'svn' group and making sure to give group permissions to the svn repository (usually at /home/svn/). The other way is to create users specific to the project that has been created, so you do not have to add the user to LDAP. For the examples I will show below I will be demonstrating on a project called 'testsvn', this is under the folder /home/svn/.

LDAP Group Member

Go into the LDAP GUI (luma) and make sure the user is in the 'svn' group.
Then make sure that the folder has group permissions by using this command:
 chmod -R 775 /home/svn/testsvn/

Project Specific

The files that will be modified are in the /home/svn/testsvn/conf/.

chmod -R 775 /home/svn/testsvn/

/home/svn/testsvn/conf/svnserve.conf

[general]
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
realm = 'TestSVN'

/home/svn/testsvn/conf/passwd

[users]
uname = password
test = password

/home/svn/testsvn/conf/authz

[groups]
test_dev = uname, test
[testsvn:/]
@test_dev = rw
* = r

SVN Examples

These are a few commands to use when checking out and commiting commands to this setup.

svn checkout --username test svn://gourd.unh.edu/testsvn
svn commit --username test testsvn/ -m "test example"