You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jerome Benezech <jb...@yahoo.com> on 2007/06/07 05:59:23 UTC

Repository Not Found with svn:ssh

Hi All,

I finally got to compile subversion 1.4.3 on a
GNU/Linux server and now run into problems trying to
access it.

I am running subversion on a shared host so it is
installed in my home directory and svnserve is started
with my user account.

When starting snvserve like this:
svnserve -d -r /home/user/svn/repositories
I can connect to my repository fine using either
file:/// or svn://
svn ls svn://user@myhost.com/myproject works fine

Now I would like to use SSH tunelling for remote
access. So I start svnserve like this:
svnserve -t -r /home/user/svn/repositories &

Then I try to access the repository from my server,
using the same user account:
svn ls svn+ssh://user@myhost.com/myproject 

There I get the "No repository found" error. I tried
using several URL
svn ls
svn+ssh://user@myhost.com/home/user/svn/repositories/myproject

svn ls
svn+ssh://user@myhost.com~/svn/repositories/myproject 
..

None of these work. I really don't know where to go
from there and any help would be great.

Thanks
Jerome


 

Jerome Benezech
jbenezech@yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Repository Not Found with svn:ssh

Posted by Jerome Benezech <jb...@yahoo.com>.
Thanks.
Problem solved using --tunnel-user option to start
svnserve


--- Hari Kodungallur <hk...@gmail.com> wrote:

> On 6/6/07, Jerome Benezech <jb...@yahoo.com>
> wrote:
> >
> > Hi All,
> >
> > I finally got to compile subversion 1.4.3 on a
> > GNU/Linux server and now run into problems trying
> to
> > access it.
> >
> > I am running subversion on a shared host so it is
> > installed in my home directory and svnserve is
> started
> > with my user account.
> >
> > When starting snvserve like this:
> > svnserve -d -r /home/user/svn/repositories
> > I can connect to my repository fine using either
> > file:/// or svn://
> > svn ls svn://user@myhost.com/myproject works fine
> >
> > Now I would like to use SSH tunelling for remote
> > access. So I start svnserve like this:
> > svnserve -t -r /home/user/svn/repositories &
> 
> 
> 
> You don't need to start the svnserve when trying to
> access the repository
> using svn+ssh.
> I believe the client sends to command over to the
> server to start svnserve.
> This usually means that svnserve should be in the
> default system path in
> order to start svnserve. And by default (unless you
> do some tricks:
>
http://svn.collab.net/repos/svn/trunk/notes/ssh-tricks)
> it starts the server
> without the -r param. So the client has to provide
> the full path in the URL.
> 
> 
> Then I try to access the repository from my server,
> > using the same user account:
> > svn ls svn+ssh://user@myhost.com/myproject
> >
> > There I get the "No repository found" error. I
> tried
> > using several URL
> > svn ls
> >
>
svn+ssh://user@myhost.com/home/user/svn/repositories/myproject
> 
> 
> So, as explained above, this is the right way to
> access the repository using
> svn+ssh.
> 
> However, I am lost why it could not find the
> repository. The only remotely
> possible reason I can think of is that the
> repository is not readable to
> 'user'. Usually the problem in such instances is
> when svnserve is not in the
> system path and it could not start it when executing
> the command. But in
> that case the error is not "No repository found".
> That error usually means
> just that -- no repository found.
> 
> 
> svn ls
> >
>
svn+ssh://user@myhost.com~/svn/repositories/myproject
> > ..
> >
> > None of these work. I really don't know where to
> go
> > from there and any help would be great.
> >
> >
> 
> regards,
> -Hari
> 


Jerome Benezech
jbenezech@yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Repository Not Found with svn:ssh

Posted by Hari Kodungallur <hk...@gmail.com>.
On 6/6/07, Jerome Benezech <jb...@yahoo.com> wrote:
>
> Hi All,
>
> I finally got to compile subversion 1.4.3 on a
> GNU/Linux server and now run into problems trying to
> access it.
>
> I am running subversion on a shared host so it is
> installed in my home directory and svnserve is started
> with my user account.
>
> When starting snvserve like this:
> svnserve -d -r /home/user/svn/repositories
> I can connect to my repository fine using either
> file:/// or svn://
> svn ls svn://user@myhost.com/myproject works fine
>
> Now I would like to use SSH tunelling for remote
> access. So I start svnserve like this:
> svnserve -t -r /home/user/svn/repositories &



You don't need to start the svnserve when trying to access the repository
using svn+ssh.
I believe the client sends to command over to the server to start svnserve.
This usually means that svnserve should be in the default system path in
order to start svnserve. And by default (unless you do some tricks:
http://svn.collab.net/repos/svn/trunk/notes/ssh-tricks) it starts the server
without the -r param. So the client has to provide the full path in the URL.


Then I try to access the repository from my server,
> using the same user account:
> svn ls svn+ssh://user@myhost.com/myproject
>
> There I get the "No repository found" error. I tried
> using several URL
> svn ls
> svn+ssh://user@myhost.com/home/user/svn/repositories/myproject


So, as explained above, this is the right way to access the repository using
svn+ssh.

However, I am lost why it could not find the repository. The only remotely
possible reason I can think of is that the repository is not readable to
'user'. Usually the problem in such instances is when svnserve is not in the
system path and it could not start it when executing the command. But in
that case the error is not "No repository found". That error usually means
just that -- no repository found.


svn ls
> svn+ssh://user@myhost.com~/svn/repositories/myproject
> ..
>
> None of these work. I really don't know where to go
> from there and any help would be great.
>
>

regards,
-Hari

Re: Repository Not Found with svn:ssh

Posted by Thomas Harold <tg...@tgharold.com>.
Jerome Benezech wrote:
> Hi Thomas,
> 
> You got me a bit confused. I mean, my config is now
> working with my svn server on Linux, started in
> tunneling mode and the subeclipse plugin as client on
> Win XP. But this works only with subeclipse plugin in
> Java mode (not JNI) and the svn client does not work.
> Anyway, this is enough for me to work but after
> reading your post, I wonder: is the svnserve in
> tunneling mode supposed to run on the server or on the
> client ?

When doing tunneling mode:

- The Windows client initiates a svn+ssh connection to the SVN Linux 
server using a public key pair
- When the client connects to SSH on the linux server, SSH looks at the 
authorized_keys file.
- It sees that this key is limited to running "command=..."
- Instead of presenting you with a shell, the SSH server runs the 
specified command instead
- So "svnserve -t" is running on the server as whatever user you 
authenticated as (using the SSH key)
- The SVN client on the Windows box is now talking to the copy of 
"svnserve -t" that is running on the SVN server

That's a loose translation of what happens when you use svn+ssh 
tunneling.  Instead of running a permanent svnserve daemon on the SVN 
server, you're running instanced versions of svnserve in tunnel mode. 
These copies are executing under user accounts (whichever user SSH'd in 
and fired up "svnserver -t").  So if a tunneled svnserve connection were 
to be used as a hack vector, the hacker would only be able to touch 
whatever the user would be able to touch if they logged in to a command 
shell.

.....

For the regular Win32 SVN client to work with svn+ssh, I'm pretty sure 
that you have to have PuTTY and Pageant installed.  Create a public key 
pair in PuTTY, copy the public portion of the key up to the SVN server 
and stick it in the ~/.ssh/authorized_keys file.

# su accountname
# cd /home/accountname
# mkdir .ssh
# chmod 700 .ssh
# cd .ssh
# cat > username@svn.pub
(paste in PuTTY key)
# ssh-keygen -i -f username@svn.pub >> authorized_keys
(that converts PuTTY's key format into something that OpenSSH can deal with)
# vi authorized_keys
(put the following on the front of the PuTTY SVN key)
command="/usr/bin/svnserve -t -r /var/svn",no-agent-forwarding,no-pty

Then, on the Windows client, load the private key into Pageant and leave 
Pageant running in the system tray.  We have a batch file that loads 
keys when the user logs in.  You will (probably) also need the following 
2 environment variables:

SVN_ASP_DOT_NET_HACK=*
(use the dot-net-hack one if your SVN directories are _svn instead of 
.svn on the windows box - if you do this, make sure that all of your 
tools support using "_svn" folder names)

SVN_SSH=plink

Make sure that "C:\Program Files\PuTTY" is in your path so that SVN can 
find the "plink" executable.

It's been a while since I've setup PuTTY, but I think that's the steps.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Repository Not Found with svn:ssh

Posted by Jerome Benezech <jb...@yahoo.com>.
Hi Thomas,

You got me a bit confused. I mean, my config is now
working with my svn server on Linux, started in
tunneling mode and the subeclipse plugin as client on
Win XP. But this works only with subeclipse plugin in
Java mode (not JNI) and the svn client does not work.
Anyway, this is enough for me to work but after
reading your post, I wonder: is the svnserve in
tunneling mode supposed to run on the server or on the
client ?

I guessed the svnserve is the server side of things
but your comment confused me a bit.

Also, I did the SSH config you explain but this only
works for me when using cygwin, not with other
clients.

Thanks
Jerome

--- Thomas Harold <tg...@tgharold.com> wrote:

> Jerome Benezech wrote:
> > Hi All,
> > 
> > I finally got to compile subversion 1.4.3 on a
> > GNU/Linux server and now run into problems trying
> to
> > access it.
> > 
> > I am running subversion on a shared host so it is
> > installed in my home directory and svnserve is
> started
> > with my user account.
> 
> svn+ssh mode does not require svnserve to be running
> in daemon mode. 
> Instead, you can use the "command=" feature of SSH
> public keys to run it 
> in tunnel mode (the "-t" parameter).  Using the "-r"
> parameter also 
> works well to shorten the URL.  You'll need to edit
> the 
> ~/.ssh/authorized_key files on your server to setup
> the command parameter.
> 
> (I create a special-purpose SSH key pair, just for
> use with SVN.  Which 
> is necessary if you're doing "command=" tricks. 
> Along with PuTTY's 
> Pageant it makes svn+ssh pretty seamless on Windows
> clients.  )
> 
> You may also want to take a look at:
> 
>
http://svn.collab.net/repos/svn/trunk/notes/ssh-tricks
> 
> Or my super-abbreviated guide where I list the
> commands for setting up 
> SSH keys and repositories.  It's written for use
> with FSVS, but since 
> FSVS uses SVN repositories for its storage, it still
> applies.
> 
>
http://www.tgharold.com/techblog/2007/05/fsvs-for-sysadmins.shtml
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail:
> users-help@subversion.tigris.org
> 
> 


Jerome Benezech
jbenezech@yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Repository Not Found with svn:ssh

Posted by Thomas Harold <tg...@tgharold.com>.
Jerome Benezech wrote:
> Hi All,
> 
> I finally got to compile subversion 1.4.3 on a
> GNU/Linux server and now run into problems trying to
> access it.
> 
> I am running subversion on a shared host so it is
> installed in my home directory and svnserve is started
> with my user account.

svn+ssh mode does not require svnserve to be running in daemon mode. 
Instead, you can use the "command=" feature of SSH public keys to run it 
in tunnel mode (the "-t" parameter).  Using the "-r" parameter also 
works well to shorten the URL.  You'll need to edit the 
~/.ssh/authorized_key files on your server to setup the command parameter.

(I create a special-purpose SSH key pair, just for use with SVN.  Which 
is necessary if you're doing "command=" tricks.  Along with PuTTY's 
Pageant it makes svn+ssh pretty seamless on Windows clients.  )

You may also want to take a look at:

http://svn.collab.net/repos/svn/trunk/notes/ssh-tricks

Or my super-abbreviated guide where I list the commands for setting up 
SSH keys and repositories.  It's written for use with FSVS, but since 
FSVS uses SVN repositories for its storage, it still applies.

http://www.tgharold.com/techblog/2007/05/fsvs-for-sysadmins.shtml



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org