svn doco links:
http://svnbook.red-bean.com/en/1.4/svn.serverconfig.svnserve.html#svn.se...
http://svnbook.red-bean.com/en/1.4/svn.serverconfig.multimethod.html <-- checklist re. ssh setup at the bottom
quick summary is:
- we're not running any new external service, svnserve is invoked in tunnel mode via ssh
- any new user will have to be setup with a valid ssh key in /home/svnserve/.ssh/authorized_keys as per the examples below
- checking out code goes like this on a machine configured to use a key on svnserve@svnhost:
justin@justin-desktop:~/new$ svn co svn+ssh://svnserve@svnhost/$module
the gory details
root@svnhost:~ # apt-get install subversion subversion-tools
root@svnhost:~ # addgroup --system svnserve
Adding group `svnserve' (GID 115) ...
Done.
root@svnhost:~ # adduser --ingroup svnserve svnserve
...
root@svnhost:~ # vipw -g
... add users to svnserve group ...
root@svnhost:~ # su - svnserve
svnserve@svnhost:~$ ssh-keygen -t dsa
Generating public/private dsa key pair.
...
svnserve@svnhost:~$ touch .ssh/authorized_keys
svnserve@svnhost:~$ exit
logout
root@svnhost:~ # cat /home/
root@svnhost:~ # vim /home/svnserve/.ssh/authorized_keys
... add the username param as per the svn docs ...
root@svnhost:~ # cat /home/svnserve/.ssh/authorized_keys
command="umask 002 && /usr/bin/svnserve -t -r /home/svnserve/svn --tunnel-user=janedoe" ssh-rsa ... key string ...
root@svnhost:~ # su - svnserve
... copy across some code to import ...
svnserve@svnhost:~$ svn import /home/justin/l33tcode -m "initial import" file:///home/svnserve/svn/l33tcode
....
Committed revision 1.
accessing from a computer with the ssh keys configured above and testing it works:
justin@justin-desktop:~/new$ svn co svn+ssh://svnserve@svnhost/l33tcode
....
Checked out revision 1.
justin@justin-desktop:~/new$ ls
l33tcode
justin@justin-desktop:~/new$ vim l33tcode/icanhas.php
justin@justin-desktop:~/new$ svn diff l33tcode/icanhas.php
Index: l33tcode/icanhas.php
===================================================================
--- l33tcode/icanhas.php (revision 1)
+++ l33tcode/icanhas.php (working copy)
@@ -1,5 +1,7 @@
<?php
+/**
+ * this is a test
+ */
require_once dirname(__FILE__) . '/l33t.inc';
justin@justin-desktop:~/new$ svn ci -m "l33t" l33tcode/icanhas.php
Sending l33tcode/icanhas.php
Transmitting file data .
Committed revision 2.