Log in

View Full Version : svn+ssh problem


OHPen
December 6th, 2010, 09:56
Hi all,

I have a problem not directly related to reverse engineering but maybe i can profit from your experience. To be honest, if I don't find a solution for my probem, I WILL START REVing the problem!!!

But first lets see if there is another solution for my problem.

I set a an svn server on a kubuntu system in order to manage my reverse engineering source there. Everything is fine with the server, i set it up correctly with tunneling enabled.

Currently i use windows 7 + tortoise svn ( a gui svn client ) and with it no probelem with checking in source, checking out and so....

my svn line for checking out looks like that:

svn co svn+ssh://xxx.xxx.xxx.xxx/svn_repositories/main_repo

but i also tried different lines:

svn co svn+ssh://xxx.xxx.xxx.xxx/svn_repositories/main_repo --usename xxxxxx --password xxxxxxxx

or

svn co svn+ssh://xxxxxx@xxx.xxx.xxx.xxx/svn_repositories/main_repo

Accordingly to that i read a lot of documentation where is stated that i have to set SVN_SSH environment variable to point to my plink.exe which is the commandline interface of putty for ssh support

I also used a lot of plink execution variants like:

plink.exe -ssh -l xxxxxxx -pw yyyyyyy
plink.exe -ssh -noagent -l xxxxxxx -pw yyyyyyy
plink.exe -ssh -noagent -l xxxxxxx@xxx.xxx.xxx.xxx -pw yyyyyyy
plink.exe -noagent

and so on...

And yes my ssh is set up correctly. I have no problem accessing my server with my credentials.

Either the error message is that he is no able to establish the tunnel, or it is hanging without doing anything or printing anything to console.

There is configuration file in %HOME%user/app_data/subversion/ called config where you can specify the ssh sheme in the tunnels section. I also tried that without success. plink is in my path, so i can execute it everywhere.

There is only one way to use svn over ssh if i use peagnt.exe which is a putty tool for caching ssh logins. Usually you can use it because a few protocols execute parallel logins what will anoy you with a lot of login request. That tool will hook those ssh request and provide authetificatio via a registered key.

BUT i dont want to use peagant neither i want to use cygwin!!!! There must be a possibility to run run an working svn client with svn+ssh login sheme by simple registering environment variables and executing the svn command......

A lot of people have problems with that on windows, especially on windows 7. If i find a solution for it i will post it on my blog to kill that fucking problem forever!!! i hate it to spent so much time for SETUP and the real work is still not done.

If someone has a usefull hint for me or can point into an alternative direction, GREAT!!
Your help will be appreciated ;D

Regards,
OHPen.

OHPen
December 6th, 2010, 17:16
Finally after 4 days i solved my problem!

After replacing plink.exe from the putty project with the custom one from the trotoise svn project and after setting SVN_SSH to "path/to/tortoiseplink.exe", a dialog appeared asking me for my credentials. After entering them the svn+ssh sheme worked. I started to understand the problem. after doing the same with the plink.exe from the putty project the effect was that my console was hanging, or lets better say, waiting for something without displaying any error or question. i checked the commandline args of plink.exe and as mentioned before there are two parameters, -l for username and -pw for password. i changed the SVN_SSH environment variable to "path/to/tortoiseplink.exe" -l myuser -pw mypass and tried again.

It worked!!!!!

Now the cause of the problem is quite clear. It seems that plink.exe from the putty project is not able to ask for the credentials if used in tunneling mode together with svn.
in my opinion this is a bug, because specifying credentials in an evironment variable is less of any security. Everyone can get the svn user and pass but simple echoing the SVN_SSH environment variable. Thats bullshit.

I will write the author of the tool and maybe he/she will fix it.

That was a nightmare, wasting 4 days only with that fucking svn console client.
Why is god hating me ? ;D

Regards,
OHPen.

dELTA
December 6th, 2010, 19:45
Congrats, and thanks for letting us in on the solution in the end.