How did you setup the svn repository? It sounds like you are serving it over HTTP with Apache perhaps?
I find the easiest way to server a private repo is to use the
svn+ssh:// protocol rather than HTTP. That way, you can manage access to it via a normal user account. For instance, if we wanted to set up an
- sudo adduser svn
- cd /home/svn/
- sudo -u svn mkdir project
- sudo -u svn svnadmin create /home/svn/myproject
You would then be able to access it with the same password you set when running
adduser svn when running:
- svn co svn+ssh://firstname.lastname@example.org/home/svn/myproject
You can also add SSH public keys to
/home/svn/.ssh/authorized_keys in order to grant access to the private repo without sharing the password.
If you are allowing others to use the repo, you'll want to make sure that the
svn user can't log in to the server itself and only be used via
Edit the file
/etc/ssh/sshd_config and append:
Match User svn
ForceCommand /usr/bin/svnserve -t
Finally, restart SSH for the changes to take effect:
This wiki page goes over a few other options as well.