Wednesday, October 28, 2009

Setting up a non-admin SVN repository shared with multiple users

A trick is using SSH with public key as described in

As a quick summary, I have set up a SVN repository as follows:
1. create a svn root directory, which will share with others, and create a repository:
$ mkdir /path/svnshare
$ svnadmin create /path/svnshare/project

2. Get public keys of user to share svn repository and insert to ~/.ssh/authorized_keys the following line:
command="/path/to/svnserve -t -r /path/svnshare --tunnel-user=[USERID]",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty [KEY_TYPE] [PUB_KEY] [COMMENT]
[.] should be replaced with users' information

3. Now users can access the shared svn repository remotely as follows:
svn co svn+ssh://[MYID]@[SERVER IP or DNS]/project

Note that use relative path names of repository after server ip or dns

0 comments: