Clearing TortoiseSVN authentication cache from the command line

27,542

Solution 1

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.

Solution 2

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.

Share:
27,542
Dave
Author by

Dave

I love programming! (especially .NET now)

Updated on December 03, 2020

Comments

  • Dave
    Dave over 3 years

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

  • Zac Thompson
    Zac Thompson about 14 years
    Beat me to it. But yes, the authentication is just stored in files, so deleting the files will clear it.
  • Dave
    Dave about 14 years
    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!