Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recover SVN password from local cache

is there a way to recover a password from local cache? The password has to be stored somewhere because I can run

svn co http://my.svn.server/foo 

but I've lost the password it self. Do I have to reset it or is it possible (and how) to find and decrypt the password? I'm using mostly CLI SVN on windows, sometimes switching to TortoiseSVN or IntelliJ Idea SVN.

like image 870
Ondrej Skalicka Avatar asked May 06 '11 11:05

Ondrej Skalicka


People also ask

How do I recover my SVN password?

At the top right in the search box, type in the the host URL (e.g. svn.mycompany.com) Your keychain item will show if you chose to have your Mac remember your login credentials. Double click the item and check the "Show password" checkbox at the bottom of the dialog that pops up.

Where is SVN password stored?

On Windows, the Subversion client stores passwords in the %APPDATA%/Subversion/auth/ directory.

Where does TortoiseSVN store passwords?

Enter your username and password. The checkbox will make TortoiseSVN store the credentials in Subversion's default directory: %APPDATA%\Subversion\auth in three subdirectories: svn. simple contains credentials for basic authentication (username/password).


2 Answers

On Windows, Subversion stores the auth data in %APPDATA%\Subversion\auth. The passwords however are stored encrypted, not in plaintext.

You can decrypt those, but only if you log in to Windows as the same user for which the auth data was saved.

Someone even wrote a tool to decrypt those. Never tried the tool myself so I don't know how well it works, but you might want to try it anyway:

http://www.leapbeyond.com/ric/TSvnPD/

Update: In TortoiseSVN 1.9 and later, you can do it without any additional tools:

Settings Dialog -> Saved Data, then click the "Clear..." button right of the text "Authentication Data". A new dialog pops up, showing all stored authentication data where you can chose which one(s) to clear. Instead of clearing, hold down the Shift and Ctrl button, and then double click on the list. A new column is shown in the dialog which shows the password in clear.

like image 173
Stefan Avatar answered Sep 25 '22 03:09

Stefan


In ~/.subversion/auth/svn.simple/ you should find a file with a long hexadecimal name. The password is in there in plaintext.

If there is more than one file you'll need to find that one that references the server you need the password for.

like image 30
Stephen Paulger Avatar answered Sep 23 '22 03:09

Stephen Paulger