tags:

views:

360

answers:

4

We recently installed SVN 1.5.2 (with VisualSVN/Apache) on some of our servers / virtual machines, and now when I send a commandline command with username/password they don't get cached anymore. Before, we were running SVN 1.5.0 installed with CollabNet, on svn://, and the credentials were cached after the first command.

So far, I'm finding difficulties in troubleshooting this. My situation is:

  • SERVER_SVN (SVN 1.5.2 via svn://)
  • SERVER_HTTP (SVN 1.5.2 via http://)

Command from commandline to SERVER_SVN: credentials cached fine

Same command to SERVER_HTTP: credentials are not cached

So, it seems like an http/apache server problem... BUT, from Tortoise the credentials are cached to both servers, so it also seems a client call problem. I'm running out of ideas...

A sample command sequence I use:


svn ls c:\mylocalfolderSVN --username foo --password bar
svn ls c:\mylocalfolderSVN // this works
svn ls c:\mylocalfolderHTTP --username foo --password bar
svn ls c:\mylocalfolderHTTP  // this fails

The last command stops and asks for authentication.

Is credentials caching different between svn:// and http://, or did we miss something in the server configuration?

Thanks in advance for any suggestion.

+1  A: 

AFAIK the credential caching is a client responsibility. All the server does is ask for those credentials when necessary. I'd check the local client configuration files and maybe see what happens with different version clients.

wds
A: 

Are you fully qualifying the domain name of the SVN server? If the caching for HTTP is cookie based and the server is writing a cookie with the FQDN, but your request doesn't use the FQDN (you are using svnserver and the FQDN is svnserver.company) then the cookie may not be valid and each request will need authentication.

Instantsoup
A: 

As wds points out, SVN credentials caching is done on the client side by svn.exe, after receiving a response from the server like "ok, I actually used the credentials you send, and they're fine".

And this is why I can't figure out what's happening: I have 2 servers installed from scratch, I send the same commandlines to both, one set of credentials is cached, the other is not... but TortoiseSVN, which uses the same svn.exe underneath, caches both (maybe it cheats, caching the credentials then svn.exe fails to do so).

My best guess right now is that the http:// server does not send an "appropriate" response to svn.exe, but I really don't feel like sniffing all the http requests to see what's happening, call me lazy, but I've got funnier stuff to do :-)

So I changed my design, now I'll be keeping the SVN password in memory (WinForm client application, all used in our internal network), and pass it with each command.

Filini
A: 

In order to cache credentials, apart from appropriate configuration, you need to execute SVN like this:

svn ls REPOSITORY_URL

instead of

svn ls WORKING_COPY_PATH

This is what worked for me, not really sure if this is the solution in this case.

thanks a lot for the reply. Eventually we changed our calls, authenticating each request (no caching any more) :-)I had forgot to close this thread...
Filini