Where does SVN client store user authentication data?

SvnAuthentication

Svn Problem Overview


I am trying to simulate a problem we have with a particular domain ID which has issues accessing a subversion repository. Towards this, I tried a svn checkout with the option --username domain\problematic_ID on another windows machine. But I am not able to reproduce the problem as the checkout still succeeds using my own ID. This led me to wonder if SVN caches user authentication data in more than one place and if so where.

I have cleared the auth directory in the application data area, changed the options in the config file to disable caching of user auth data - but to no avail. The system does not even prompt me for the new user name and password, but simply checks out with the old ID.(I know it is the old ID in use by looking through the SVN logs). I am obviously missing something here -- but what? :-(

Does anyone know?

The subversion client version I use is 1.4.6(r28521)

Svn Solutions


Solution 1 - Svn

  • On Unix, it's in $HOME/.subversion/auth.

  • On Windows, I think it's: %APPDATA%\Subversion\auth.

Solution 2 - Svn

It sounds like you are doing everything exactly as the client credential section of the Subversion book suggests. The only thing I can think of is that the server isn't asking for the username and password because is getting it from somewhere else.

Solution 3 - Svn

Which version do you use?

Here is the documentation on credential caching, for the latest (1.6 as of writing).

> On Windows, the Subversion client > stores passwords in the > %APPDATA%/Subversion/auth/ directory. > On Windows 2000 and later, the > standard Windows cryptography services > are used to encrypt the password on > disk. Because the encryption key is > managed by Windows and is tied to the > user's own login credentials, only the > user can decrypt the cached password. > (Note that if the user's Windows > account password is reset by an > administrator, all of the cached > passwords become undecipherable. The > Subversion client will behave as > though they don't exist, prompting for > passwords when required.)

Also, be aware that a few changes occurred in version 1.6 regarding password storage.

Solution 4 - Svn

I know I'm uprising a very old topic, but after a couple of hours struggling with this very problem and not finding a solution anywhere else, I think this is a good place to put an answer.

We have some Build Servers WindowsXP based and found this very problem: svn command line client is not caching auth credentials.

We finally found out that we are using Cygwin's svn client! not a "native" Windows. So... this client stores all the auth credentials in /home/<user>/.subversion/auth

This /home directory in Cygwin, in our installation is in c:\cygwin\home. AND: the problem was that the Windows user that is running svn did never ever "logged in" in Cygwin, and so there was no /home/<user> directory.

A simple "bash -ls" from a Windows command terminal created the directory, and after the first access to our SVN server with interactive prompting for access credentials, alás, they got cached.

So if you are using Cygwin's svn client, be sure to have a "home" directory created for the local Windows user.

Solution 5 - Svn

On Windows, you can find it under.

%USERPROFILE%\AppData\Roaming\Subversion\auth\svn.simple
(same as below)
%APPDATA%\Roaming\Subversion\auth\svn.simple

There may be multiple files under this directory, depending upon the repos you are contributing to. You can assume this as one file for each svn server. You can open the file with any text editor and make sure you are going to delete the correct file.

Solution 6 - Svn

Read SVNBook | Client Credentials.

With modern SVN you can just run svn auth to display the list of cached credentials. Don't forget to make sure that you run up-to-date SVN client version because svn auth was introduced in version 1.9. The last line will specify the path to credential store which by default is %APPDATA%\Subversion\auth on Windows and ~/.subversion/auth/ on Unix-like systems.

PS C:\Users\MyUser> svn auth
------------------------------------------------------------------------
Credential kind: svn.simple
Authentication realm: <https://svn.example.local:443> VisualSVN Server
Password cache: wincrypt
Password: [not shown]
Username: user

Credentials cache in 'C:\Users\MyUser\AppData\Roaming\Subversion' contains 5 credentials

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionCritical Skill View Question on Stackoverflow
Solution 1 - SvnNikola KoturView Answer on Stackoverflow
Solution 2 - SvnTim KrygerView Answer on Stackoverflow
Solution 3 - SvnRedGlyphView Answer on Stackoverflow
Solution 4 - SvnniglesiasView Answer on Stackoverflow
Solution 5 - SvnManoharView Answer on Stackoverflow
Solution 6 - SvnbahrepView Answer on Stackoverflow