views:

881

answers:

2

I have previously had a repository on my computer for local use and removed it.

Now I am trying to set another one up. But keep getting "Authorization failed" even when entering a correct password, when I enter a wrong password it tells me so. This is exactly how I set it up the first time but now every time it fails. What am I doing wrong? It is the only repository on my computer. I have already tried a reinstall of subversion and removing the cache in my AppData folder but nothing has helped.

I am using this guide to set it up. http://www.codinghorror.com/blog/archives/001093.html

This is what I am doing

C:\>svnadmin create "H:\SVN\Repository"

C:\>sc create svnserver binpath= "C:\Program Files (x86)\Subversion\svnserve.exe
 --service -r H:\SVN\Repository" displayname= "SubVersion" depend= Tcpip start=
auto
[SC] CreateService SUCCESS

C:\>set SVN_EDITOR=c:\windows\system32\notepad.exe

C:\>net start svnserver
The SubVersion service is starting.
The SubVersion service was started successfully.

C:\>svn mkdir svn://localhost/myProject

Log message unchanged or not specified
(a)bort, (c)ontinue, (e)dit:
c
Authentication realm: <svn://localhost:3690> myProject
c
Password for 'Admin':
Authentication realm: <svn://localhost:3690> myProject
c
Username: user
Password for 'user': ********
svn: Authorization failed

C:\>

My svnserve.conf file

[general]
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
realm = myProject

And my passwd file

[users]
user = password
A: 

Try doing svn mkdir svn://localhost/myProject -m "some message" --username user --password password and see if that makes a difference.

Michael Hackner
+1  A: 

The error message says "Authorization failed", not "Authentication failed". Which means you successfully authenticated (i.e., your username and password is ok), but the user as whom you authenticated doesn't have the rights to execute the command (i.e., you're not authorized to create the directory).

That either means that you're not connecting to the correct svnserve instance (you said you already have one set up and this is the second one you're trying to set up), or the svnservice doesn't use the correct svnserve.conf file, or the 'authz' file is not the correct one (maybe specify a full path to the auth files in your svnserve.conf file).

Stefan
Thanks, I fixed it by removing the authz-db line from the svnserve.conf file. I don't know why it caused a problem, there was nothing un-commented in it.
Grym