How to Store SVN Password in Encrypted Form in Linux

Linux SVN clients generally store the password in plain text. When you first time access the SVN server, the client asks whether you want to store the password in pain text. You can definitely choose not to store the password but if you don’t store that, you need to enter password every time you want access the server. Storing password in plain text is not also a good idea because anyone can see that who has access to your ~/.subversion/auth directory. This is not a problem on Windows or MAC OS. Because SVN clients store passwords in encrypted form by default on those systems. You can also configure your Linux system also to store the password in encrypted form. This document will describe how to do that. RedHat based Linux is used in this example

1. Install subversion-gnome. To that you need to login as root (super user).

2. Login as the user that will use SVN. Go to the home directory of the user.
3. Configure SVN to store password but not in plain text by modifying the ~/.subversion/servers file. Add the following lines under the [global] block.

4. Configure SVN to store the password in gnome-keyring by editing ~/.subversion/config file. Add the line under [auth] block.

5. Get the keyring_tool from the CollabNet website . keyring_tool is a binary available in CollabNet Subversion package. Run the following commands.

6. Add the following lines in the .bashrc file so that keyring daemon is started every-time you start a new session.

8. Now add the lines in the .bash_logout file so that dbus and keyring sessions get killed when you exit from the session.

9. Now you system is ready to store the SVN password in encrypted form. You need to logout and login again. You can use the same session also, then you have to manually run these commands.

Leave a Reply

Your email address will not be published. Required fields are marked *