Subversion does not remember the user/password

svn

I've installed Subversion on Ubuntu following the guide Installation of Subversion on Ubuntu, with Apache, SSL, and BasicAuth..

It works, and I was able commit and create different repositories, but somehow, from time to time (sometimes minutes), when trying to do a commit, I'm forced to reset or recreate my user and password with the following command.

htpasswd2 -c -m /etc/apache2/dav_svn.passwd $AUTH_USER 

Because SVN does not recognize my user/password anymore.

I'm using TortoiseSVN as SVN Client. I would like to know why this is happening. Maybe it's a configuration issue, or maybe TortoiseSVN is sending invalid credentials, causing a locked account. Since I'm far from being an SVN expert/administrator. Are there some pointers in order to attack the problem.

Best Answer

Check if your password-file actually has changed. Do a

md5 /etc/apache2/dav_svn.passwd or cat /etc/apache2/dav_svn.passwd

when it works, and after it stops working. If it changes, you've gotta figure out why (automatic update from a cronjob? some website/admin tool changing it for you?)

Note that subversion + apache does not change this file in any way if you're using any form of default setup.

I also hope that you replace $AUTH_USER with your proper username ;-) (or at least have exported the variable).

If the file hasn't changed, then it's something else. See if there's anything in the apache error log.

A few other possibilities:

  • Try disabling https (for testing - since you probably don't have a valid certificate).
  • Check your .subversion/auth folder; I'm not sure about tortoisesvn, but I believe it stores credential information there (just like vanilla svn).
  • Not likely, but instead of recreating your user see if touch /etc/apache2/dav_svn.passwd will do the trick.
  • Is the file writable by anyone but root? If so, chmod 644 /etc/apache2/dav_svn.passwd