[02:48][root@server:~] ps ax | grep svn
23986 ? Ss 0:00 /usr/bin/svnserve -d -r /srv/svn
As you see from arguments my svn root dir is /srv/svn.
Now, some magic from remote machine...
This works:
> svn co svn://[email protected]/test-repo
But this not:
> svn co svn+ssh://svn-user@<putty-session-name>/test-repo
'No repository found in 'svn+ssh://svn-user@<putty-session-name>/test-repo'
Playing around for couple of hours I've found that appearantly if I use ssh tunnel, I'm able to get my repo using following:
> svn co svn+ssh://svn-user@<putty-session-name>/srv/svn/test-repo
...which means that I should specify full physical path to the repo. Huh?
As womble have said, indeed this is the 'feature' of svn over ssh.
I had svn+ssh working without specifying the full path to repositories because the svn server had a svnserve wrapper script in place of original svnserve binary. Later, during subversion update this script was overwritten by the original binary.
Solution:
Rename svnserve to bin
Save this script as /usr/bin/svnserve:
Update permissions
That's because svn over SSH (
svn+ssh://
) is just accessing a subversion repository "locally", using SSH as the transport, and hence you have access to the entire filesystem. Svnserve, in contrast, is told "start your paths with/srv/svn
, and so you don't have to specify it manually.You can edit the ssh login command for users using svn+ssh, by editing the ~/.ssh/authorized_keys of the subversion user. The line for a user will looks like :
There are more svn+ssh tricks in the svn book
this is more like a question by itself, but it is really related to this one.
having set up svn+ssh with private/public keys i can't access my repo using relative paths in this way:
since i am getting this error:
but only like that:
This is the authorized_keys2 file i have inside /home/svn/.ssh directory
and the svnserve.bin file suggested by Andrejs at previous answer
I even thought about permission issues, that are listed here:
I really can't come up with a solution...