Search code examples
svnsshsubclipse

svn: Unable to find repository


I'm attempting to setup svn on my home network on an Ubuntu server box. I have created the repository on that box using svnadmin create /opt/svn and this was successful. I have installed ssh on this box and want to tunnel svn through ssh so I can open svn through the firewall and check in code on the go.

I am on an ubuntu workstation. I create a host entry called spenser that points to the IP address of my svn server and type

ssh spenser

to login to the box and create the rsa (or whatever) key on this box. Now I should be good.

So I start eclipse and go into sublipse svn repository browser to create my repository link. I use svn+ssh://spenser. I get the ssh challenge and enter my password. Then I get:

    Couldn't find a repository
svn: Unable to connect to a repository at URL 'svn+ssh://spenser'
svn: No repository found in 'svn+ssh://spenser'

I look at svnserve on the server and I see:

thom@spenser:~$ ps aux|grep svn
root      2015  0.0  0.2  11936   640 ?        Ss   08:07   0:00 /usr/bin/svnserve -d -r /opt/svn

Which means that it's pointing to the right repository. I look at the repository:

thom@spenser:~$ ls -l /opt/svn
total 24
drwxr-xr-x 2 root root 4096 2012-01-31 07:03 conf
drwxr-sr-x 6 root root 4096 2012-01-29 12:51 db
-r--r--r-- 1 root root    2 2012-01-29 12:51 format
drwxr-xr-x 2 root root 4096 2012-01-29 12:51 hooks
drwxr-xr-x 2 root root 4096 2012-01-29 12:51 locks
-rw-r--r-- 1 root root  229 2012-01-29 12:51 README.txt

What am I missing?


Solution

  • I am not an expert in this area, but svn+ssh:// does NOT connect to a running svnserve on the target server. The svnserve process is spawned in the SSH session itself and tunnelled back to you. I believe you need to specify svn+ssh://spenser/opt/svn

    I refer you to the Subversion book for more information:

    http://svnbook.red-bean.com/en/1.7/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.sshauth