Version 5 (modified by 16 years ago) (diff) | ,
---|
Server
General
emerge subversion emerge --config dev-util/subversion
create a group for svn
groupadd -g 1010 svngrp
edit /etc/conf.d/svnserve and change the group
#SVNSERVE_USER="apache" SVNSERVE_GROUP="svngrp"
Start the service and add it to default runlevel
/etc/init.d/svnserve start rc-update add svnserve default
Setting up access rights
I currently create a new group for each repository and assign users to the group if they need read/write access.
cd /var/svn/ chmod -R 770 repos chmod -R g+s repos/db chgrp -R svngrp repos
(svngrp is the group name that I created in /etc/group to hold the svn users)
Edit /etc/groups and add the users to the group svngrp
Edit /var/svn/repos/conf/svnserve.conf (and set the following parameters)
anon-access = read auth-access = write password-db = passwd realm = TTD_SVN
Edit /var/svn/repos/conf/passwd and add the users (see examples)
Setting up SSH access
Users that use the svn need to have ssh access set up correctly to the server. This has to be done by ssh-keys.
See http://linuxproblem.org/art_9.html
Client
Setting up an SSH-Tunnel
We do not use the standard port for ssh and svn does not support the common <user>@<host>:<port>/<path_to_repository> syntax. Therefor we have to set up a specific tunnel in run-time config file on the client!
Edit ~/.subversion/config (on the client) and at the end of the [tunnels section] make the following entry (port not shown for security reasons):
eussh = $EUSSH /usr/bin/ssh -p <port>
Test the connection
You can test the connection using the following command (this should not show any errors):
svn list svn+eussh://<user>@<host>/var/svn/repos/