How to recover svn lost password on Linux

If you are using simple web auth to connect to svn server, you can choose to store it at client side. This way you don’t have to enter it again during svn update, commit, etc. If you lose your password and for some reason you need it again to checkout code (may be code checkout on a different machine), you can get it using the following steps. These were tried on a Ubuntu Linux machine but should work on any other Linux or Mac.

Find the repository root

Run the following command from svn location to print Repository Root:

$ svn info
Repository Root:
Repository UUID: 30971f6e-c88f-4078-ac10-ab7dfecedd35

Find the svn auth file

svn auth files are stored in ~/.subversion/auth/svn.simple/ directory. There can be multiple files in case you have multiple svn repositories checked out. Find the right auth file by using grep.

$ grep -H ~/.subversion/auth/svn.simple/*
/home/user1/.subversion/auth/svn.simple/d2e40c7b1a7f205654992959b58d854f: Authorization Realm

Note that you should replace with the domain of your svn server in grep command. This will tell you correct auth file for your domain. Now you can simply view the content of the auth file to find the password. It is stored in plain text format in this file.

Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit


Click here to write/view comments