tags:

views:

1629

answers:

3

So I access my SVN repo using the good ol' putty session name trick. I can use TortoiseSVN and Subclipse just fine, the URL format looks like:

svn+ssh://@/data/svn/my-code

Example: svn+ssh://codecraig@dev-server/data/svn/my-code

So, I've checked out "my-code" to C:\my-code, now I am trying to use cygwin to check-in some changes.

I open cygwin, navigate to c:\my-code. I run "svn status" and it shows me the changes I have. Then I run:

svn ci -m "made some changes"

And I get back:

ssh: Could not resolve hostname dev-server: no address associated with name svn: Commit failed svn: Connection closed unexpectedly

How can I get cygwin to know about my putty sessions, assuming that's what the problem is here.

+1  A: 

Try editing your ssh config file to include the following:

ssh=plink.exe

(If PuTTY's plink.exe is not on your path, you may have to specify a full path.)

See also this blog entry for more complex scenarios.

MattK
I tried:ssh = c:\putty\plinkNow when I do svn ci I get:svn: Commit failedsvn: Error in child process: exec of 'c:\program' failed: No such file or directory.FYI -- TortoiseSVN is also installed on my system in c:\program files
codecraig
You can try pointing the ssh property at TortoiseSVN's version of plink (I forget what it's called, but it's in the TortoiseSVN install directory). It has the advantage of not bringing up a console window. If there are spaces in its pathname, be sure to put double-quotes around the path in config.
MattK
So I know why it complains about "c:\program"...it's because I have an evn_var:SVN_SSH=C:\\program files\\tortoisesvn\\bin\\tortoiseplink.exe", however I removed that env var, restarted cygwin and i'm back to it not liking the "dev-server" in: svn+ssh://codecraig@dev-server/...
codecraig
try in your config: ssh="C:\\Program Files\\TortoiseSVN\\bin\\tortoiseplink.exe"
MattK
Then it complains, "cannot resolve hostname dev-server"
codecraig
Hmmm. Try baking your username into the SVN session, and removing it from the URL? I'm running out of ideas here--this has always worked pretty well for me.
MattK
+1  A: 

Please use the Windows svn client, not the one in cygwin if you also use other svn clients. Those are not compatible. If you only use the cygwin client, that's fine. But you must never ever share a working copy that you use with the cygwin client with other clients. That will get you into big trouble - maybe not right away but it will, trust me.

One (obvious) reason: the cygwin svn client uses LF line endings (if the svn:eol-style is set to 'native') but 'normal' windows svn clients use CRLF.

There are other reasons you will get into big trouble with this, but those are more complicated and require knowledge of the svn internals to understand.

Stefan
A: 

Since I have an environment variable, SVN_SSH, defined in Windows so that Subclipse (an Eclipse SVN plugin) will work properly with my svn+ssh connection, I had to modify my profile in Cygwin to export the SVN_SSH var explicitly.

export SVN_SSH=/cygdrive/c/putty/PLINK.exe svn co svn+ssh://codecraig@dev-server/data/svn/....

codecraig