1
votes

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.

3

3 Answers

2
votes

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.

2
votes

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/....

1
votes

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.