Dave
Dave

Reputation: 15016

Clearing TortoiseSVN authentication cache from the command line

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

Upvotes: 16

Views: 29018

Answers (2)

DuoSRX
DuoSRX

Reputation: 4199

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

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

See the Authentication section of the TortoiseSVN documentation.

Upvotes: 23

Pekka
Pekka

Reputation: 449515

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.

Upvotes: 2

Related Questions