views:

286

answers:

2

TortoiseSVN is nice for the most part, but one thing that blows in a team development situation where more than one person is using a particular PC is the authentication. When I'm working on stuff, I like to save my credentials so that I don't need to keep entering it in for logging, branching, committing, etc.

The problem is that I always forget to clear my credentials when I walk away, because 1) I don't want to have to re-enter it again if no one else uses the computer and purposely forget, and 2) it's a PITA to do and requires 4 too many mouse clicks to do.

Ideally, I would just have a couple of nice batch files in SVN to deal with this sort of thing, including rebuilding the icon cache (which I have working okay). I looked at the command line documentation and it doesn't mention clearing the authentication cache.

Has anyone figured out how to do it? I think it'll encourage me to clear my credentials more often. It's not the end of the world since we can always change the author after the commit, but still...

A: 

According to this, this seems to be because the authentication data is managed by the SVN library, not Tortoise:

No can do either. The auth data is stored in %APPDATA%\Subversion\auth, but the username/passwords are encrypted, and stored in files which have their name as an md5 hash of the URL and the info text the server sends. Since TSVN doesn't know the info text of the server, it can't create the md5 hash and therefore doesn't know which encrypted file contains which auth data.

there doesn't seem to be a way to instruct the svn client to delete the data - all solutions I can see actually delete the files in the auth directory.

Pekka
+3  A: 

You have to delete the files manually, like so (using .bat file) :

@echo off
rmdir /s /q "%APPDATA%\Subversion\auth"

See this

DuoSRX
Beat me to it. But yes, the authentication is just stored in files, so deleting the files will clear it.
Zac Thompson
ok, thanks! I couldn't tell who answered first (I wish SO reported the time down to the millisecond), but I gave you the answer because you posted your batch file contents. :) And it totally works!
Dave