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 the password every time you 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.
Good thing is that you can configure your Linux system to store the SVN password in encrypted form. Here I’ll show you how to do that. RedHat based Linux is used in this example.
1. Install subversion-gnome. To do that you need to login as root (super user).
yum install subversion-gnome
2. Login as the user that will use SVN. Go to the home directory of that 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.
[global]
store-passwords=yes
store-plaintext-passwords=no
4. Configure SVN to store the password in gnome-keyring by editing ~/.subversion/config file. Add the line under [auth] block.
[auth]
password-stores=gnome-keyring
5. Download the keyring_tool. Untar that and go to the keyring_tool directory.
tar -zxvf keyring_tool.tar.gz
cd keyring_tool
6. Run the following commands.
./keyring_tool --create=svn
./keyring_tool --setdef=svn
Go back to the home directory.
7. Add the following lines in the ~/.bashrc file so that keyring daemon gets started every-time you start a new session.
eval `dbus-launch --sh-syntax`
export `gnome-keyring-daemon`
8. Now add the lines in the ~/.bash_logout file so that dbus and keyring sessions get killed when you exit from the session.
killall dbus-daemon
killall gnome-keyring-daemon
9. Now your 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.
eval `dbus-launch --sh-syntax`
export `gnome-keyring-daemon`
10. For the first time you might be asked for password. Provide any password of your choice.
Password for 'login' GNOME keyring:
When trying to create a keyring, I get the following message:
[centos@toto keyring_tool]$ ./keyring_tool –create=svn
WARNING: Feature not supported
I think gnome-keyring will still work if you ignore this warning. Let me know if it does not work.
I also am having this issue on RHEL 7. The keyring daemon seems to run (no complaint at login when it executes the eval) but I never see the keyring asking me to store the password.
Keyring asks password when you do first svn operation (like ‘svn up’ or ‘svn ci’).
keyring_tool is no longer available in collabnet package.
Yes, CollabNet removed that tool for some reason. I compiled the keyring_tool and made it downloadable from the post itself.