I had setup a svn server locally, and then tried to setup a username/password system, but that somehow didn’t work. I left that as it is, as the basic co and ci was working well, and the repo was consistent.
But after doing about 20 commit operations, when I had a look at svn log, it shows all the updates done by some other username(‘test’ in this case). I tired to checkout a fresh copy without giving any username, and checked in again. To my surprise it was again the same username ‘test’.
Output of svn log
------------------------------------------------------------------------
r20 | test | 2012-07-29 22:58:03 +0530 (Sun, 29 Jul 2012) | 1 line
Added useful svn commands.
So, from where does the svn pick this default user? I want the commits to be logged in by my username i.e. the login name ‘mtk’, and not by the other username ‘test’.
Any pointers?
Thanks
In the standard default command line client, the authentication is stored under the
$HOME/.subversion/authdirectory. In your case, probably under the$HOME/.subversion/auth/svn.simpledirectory.If the Subversion client finds an authentication record that matches a URL, it uses that user and password as the default. This way, you don’t have to keep logging in every time you do something in Subversion. By the way, the credentials are cached by default, but you can change that via the
$HOME/.subversion/configfile.If you’re using
svnserveas your Subversion server, your problem is probably not setting up thesvnserve.conffile correctly. It’s a common issue many beginners have. Go to the repository directory and edit thesvnserve.conffile which is in theconfdirectory.Around line #27 is the line
# password-db = passwd. Remove that leading#and space. Then, you need to edit thepasswdfile with the user credentials you want. There’s a templatepasswdfile there already. Most beginners edit thepasswdfile, but forget to remove the leading#in the.svnserve.conffile that specifies which password credential file to use.