How to save password when using Subversion from the console

I was wondering if there is a way to save my Subversion password when doing svn operations from the console. The console is the only option that I have. When I try to do any Subversion action, e.g. svn commit, it prompts for the account password every time. Is there a way to save this password somehow so that I don’t have to retype it every time?

  • Can't change username and password from git
  • What is the best practice for dealing with passwords in github?
  • How to set username/password to connect to Subversion repository in AnkhSVN in Visual Studio?
  • Store https passwords with cygwin's Git
  • Git / SourceTree - remote invalid username or password
  • git-svn password change
  • SVN, OSX10.7: SSL handshake failed: SSL error code -1/1/336032856
  • Will TortoiseSVN 1.7 work properly against a SVN 1.6 repository?
  • Integration of JIRA with TortoiseSVN
  • Split a Subversion Repository Project to Two Git Repositories
  • Visual Studio Git sync to svn
  • What is the best way to make files live using subversion on a production server?
  • 9 Solutions collect form web for “How to save password when using Subversion from the console”

    In ~/.subversion/config, you probably have store-passwords = no. Change it to yes (or just comment it out because it defaults to yes), and the next time you give Subversion your password it should save it.

    You might want to ensure that the owner and permissions of ~/.subversion/config are correct (no public or group access; 600).

    It depends on the protocol you’re using. If you’re using SVN + SSH, the SVN client can’t save your password because it never touches it – the SSH client prompts you for it directly. In this case, you can use an SSH key and ssh-agent to avoid the constant prompts. If you’re using the svnserve protocol or HTTP(S), then the SSH client is handling your password and can save it.

    Try clearing your .subversion folder in your home directory and try to commit again. It should prompt you for your password and then ask you if you would like to save the password.

    I had to edit ~/.subversion/servers. I set store-plaintext-passwords = yes (was no previously). That did the trick. It might be considered insecure though.

    Please note the following paragraph from the ~/.subversion/servers file:

    Both ‘store-passwords’ and ‘store-auth-creds’ can now be
    specified in the ‘servers’ file in your config directory.
    Anything specified in this section is overridden by settings
    specified in the ‘servers’ file.

    It is at least for SVN version 1.6.12. So keep in mind to edit the servers file also as it overrides ~/.subversion/config.

    If you use svn+ssh, you can copy your public ssh key to the remote machine:

    ssh-copy-id user@remotehost
    

    Using plaintext may not be the best choice, if the password is ever used as something else.

    I support the accepted answer, but it didn’t work for me – for a very specific reason: I wanted to use either kwallet or gnome-keyring password stores. I tried changing the settings, all over the four files:

    /etc/subversion/config
    /etc/subversion/servers
    ~/.subversion/config
    ~/.subversion/servers
    

    Even after it all was set the same, with password-stores and KWallet name (default might be wrong, right?) it didn’t work and kept asking for password forever. The files in ~/.subversion had permissions 600.

    Well, at that point, you may try to check one simple thing:

    which svn
    

    If you get:

    /usr/bin/local/svn
    

    then you may suspect with great likelihood that this client was built from source, locally, by your administrator (which may be yourself, as in my case).

    Subversion is a nasty beast to compile, very easy to accidentally build without HTTP support, or – as in my example – without support for encrypted password stores (you need either Gnome or KDE development files, and a lot of them!). But the ./configure script won’t tell you that, and you just get a less functional svn command.

    In that case, you may go back to the client, which came with your distribution, usually in /usr/bin/svn. The downside is – you’ll probably need to re-checkout the working copies, as there is no svn downgrade command. You can consult Linus Torvalds on what to think about Subversion, anyway 😉

    Unfortunately the answers did not solve the problem of asking for password for ssh+svn with a protected private key. After some research I found:

    ssh-add
    

    utility if you have a Linux computer. Make sure that you have your keys are stored in /home/username/.ssh/ and type this command on Terminal.

    I’m using the TortoiseSVN client on Windows and for me setting store-passwords parameter as yes in %USERPROFILE%\AppData\Roaming\Subversion\config does not help to store the password.

    The password was successfully saved after removing this folder (just in case renaming):

    %USERPROFILE%\AppData\Roaming\Subversion\auth
    

    Environment:

    Windows 7, TortoiseSVN 1.7.11 (Build 23600 – 64 bit, 2012-12-12T19:08:52),
    Subversion 1.7.8.

    Git Baby is a git and github fan, let's start git clone.