views:

53

answers:

1

At work we have svn setup so that when I have an ssh tunnel open to the server I can access repositories from localhost without beeing prompted for a password. (The repositories are accessed via svn://localhost/ urls). Everything works fine with TortoiseSVN and windows command line svn, but I would like to use cygwin svn. The problem is that cygwin svn keeps prompting me for a password, and it keeps asking even after I have given it my credentials. The prompt looks kind of like an http authentication prompt: Authentication realm Repository:

I'll add that I want cygwin svn because I'm using cygwin build of Emacs and psvn-mode in that emacs doesn't like the line endings of windows svn. I don't want to switch to windows emacs because grep doesn't work there very well (problems with Polish letters and such) and I'm grepping quite a lot.

Thanks for any hints towards solving my problem,

+1  A: 

Probably the cygwin svn client is using a cygwin ssh binary to make the connection. TortoiseSVN and the other commandline client you have are using some other ssh client, for which some form of passwordless authentication has been configured (probably a public key file, maybe with a passphrase and the "pageant" ssh agent implementation).

The best way to get this working is to configure similar passwordless authentication for your cygwin ssh client, by editing ~/.ssh/config and/or running cygwin's own ssh-agent to cache your passphrase. To see if your ssh configuration is working, try running ssh -v your.svn.server svnserve -t. If that outputs a line beginning with "( success", then svn should work fine. Otherwise, you should be able to diagnose the problem from the progress messages printed.

Alternatively, you could try to get cygwin's svn to use the same ssh client used by your native commandline client, by setting the SVN_SSH environment variable. See the fine manual for details.

slowdog
Actually the tunnel I have open is via cygwin ssh so it's not a problem with the ssh client. Other thing is I'm not using password caching of any sort because I'm using regular svn not svn+ssh. I setup a tunnel and then all repositories are available under svn://localhost/<repo_name>. Any ideas? Thanks for the answer though :)
jondro
Ah, I was assuming svn+ssh://. For svn:// I don't have any ideas, except that you might check for differences between the ~/.subversion/config file used by cygwin and the one used by the native svn client (probably located somewhere under %APPDATA%).
slowdog