views:

772

answers:

3

I am using Tortoise SVN, and I tend to have my own username/password stored in it's saved data so that I don't have to authenticate each time.

Trouble is, we have a number of scripts, Final Builder projects and things that use another username - and so this overwrites my own username in the saved data.

Then I go to make a commit and find that it has done it using the other username.

I know that I can manually clear the saved state, but half of the time I forget. I don't mind authenticating each time if necessary, so is there a way to prevent Tortoise SVN from caching at all?

+1  A: 

From TortoiseSVN's help:

Some people like to have the authentication data deleted when they log off Windows, or on shutdown. The way to do that is to use a shutdown script to delete the %APPDATA%\Subversion\auth directory, e.g.

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

You can find a description of how to install such scripts at windows-help-central.com .

Maybe the scripts, Final Builder projects etc. should clean the authentication data after they run.

Those scripts and tools probably use svn and not TortoiseSVN. In that case, the SVN book lists this handy switch:

--no-auth-cache

Prevents caching of authentication information (e.g. username and password) in the Subversion administrative directories.

Eli Acherkan
A: 

TortoiseSVN store the credentials in Subversion's default directory: %APPDATA%\Subversion\auth in three subdirectories:

  • svn.simple contains credentials for basic authentication (username/password).
  • svn.ssl.server contains SSL server certificates.
  • svn.username contains credentials for username-only authentication

You might have a build event that can modify or move these files.

More details: http://tortoisesvn.net/docs/release/TortoiseSVN%5Fen/tsvn-dug.html#tsvn-dug-general-auth

Priyank Bolia
+3  A: 

You can turn off authentication caching in the subversion config files, which you can usually find in %appdata%\Subversion\conf.

Look at the "store-passwords" and "store-auth-creds" settings there.

BTW: AnkhSVN users can find a dialog to delete only specific credentials in Tools -> Options -> Source Control -> Subversion Environment -> Authentication Cache

Bert Huijben
Nice! I missed the conf file option.
Eli Acherkan