[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn+ssh on windows problems

From: Ivan Kolev <ikolev_at_nat.bg>
Date: 2003-07-30 01:31:18 CEST

I recently discovered Subversion, and I'm hooked. Seems like I just
found the greatest source control system. Thanks to everyone on the
team. Looking forward to 1.0 - both for SvN and TortoiseSvN :)

Installation and everything was painless, except one thing, configuring
svn+ssh on Windows 2000. Yes, as pointed in other messages on this list,
the SvN error message when anything with ssh fails is very obscure
(Connection closed unexpectedly), more info would be helpful. I kept
searching for reasons why things didn't work, and getting the same error
message after fixing a few different reasons was frustrating.

So I'd like to share my experience with the configuration of svn+ssh, to
see if anyone else has had the same problems, and probably to help new
users who want to use SvN on Windows machines, but don't want to install
Apache. And maybe to point the problems to the SvN developers, maybe
some of them could be fixed/avoided...

The first task of course is to install the OpenSSH server for Win2K, to
the point where 'ssh localhost' connects successfully (which isn't that
hard). Here begin the svn tricks:

- Looks like the svn client expects that the ssh server on connection
doesn't print *anything* else except a password prompt. So you need to
make sure that 'ssh localhost' not just connects, but asks only for the
user password. The standalone OpenSSH server (not part of cygwin) which
I used however prints lots of extra info. One thing is to remove the
banner.txt from the OpenSSH\etc folder. Another thing is to make sure
the ssh server finds your user home folder - it expects to find it at
D:\Documents and Settings\username, which is not always true. You can
set the /home key in HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus
Solutions\Cygwin\mounts v2\ to whatever folder you want, and create
folders for the users you expect to connect there.

- Next step is to check if 'ssh localhost svnserve -t' works correctly
(this is actually the command issued by the svn client when you ask for
a svn+ssh URL). It should just ask for password, and start svnserve (the
familiar svnserve prompt should appear). If this doesn't happen, check
your PATH, but if you installed Subversion, it should be there, and this
shouldn't fail.

- Now comes the tricky part, which I wasn't able to solve. Even if 'ssh
localhost svnserve -t' works, 'svn list svn+ssh://localhost' may not
work. This is probably due to weird usage of the PATH variable by ssh,
but I'm not sure about that. When I had ssh print debug info, I saw that
it printed an error message like 'E:\Program' not found. So I decided
the space in 'E:\Program Files' was the problem, and re-installed both
Subversion and OpenSSH in the root of the E: drive, into folders without
spaces.

- The last point is that since you can't specify drives in svn+ssh
URL's, you should make sure that the OpenSSH /home folder and the SvN
repository are on the same drive. In my case, OpenSSH was in E:\OpenSSH,
and the SvN repository - in E:\SvNroot\MAX. This way I was able to
connect to my repository as svn+ssh://localhost/SvNroot/MAX

Well, that's it. I'm still not sure how and why exactly things started
to work for me, so maybe this isn't all. I'll find out the next time I
try to setup an SvN server...

Best Regards,
Ivan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 30 03:28:20 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.