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. https://blog.codinghorror.com/setting-up-subversion-on-windows/
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
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).
SVN Configuration using svnserve on Fedora 17 SVN Server Configuration
Login as a root user
svnadmin create Repository
This will create Repository dir
ll Repository/
total 24
drwxr-xr-x. 2 root root 4096 Aug 1 16:32 conf
drwxr-sr-x. 6 root root 4096 Aug 1 15:07 db
-r--r--r--. 1 root root 2 Aug 1 14:34 format
drwxr-xr-x. 2 root root 4096 Aug 1 14:34 hooks
drwxr-xr-x. 2 root root 4096 Aug 1 14:34 locks
-rw-r--r--. 1 root root 229 Aug 1 14:34 README.txt
cd Repository
Edit Repository/conf/passwd file
vi Repository/conf/passwd
Add below lines:
[users]
user1 = user1
left to the assignment is a username & right is a password
Edit Repository/conf/authz file
vi Repository/conf/authz
Add below lines:
[/]
User1 = rw
It will give user1 read & write permissions.
Edit Repository/conf/svnserve.conf file
vi Repository/conf/svnserve.conf
Add following lines:
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
Check the status of svnserve daemon
/etc/init.d/svnserve status
If it is inactive use:
/etc/init.d/svnserve start
Again check the status, if it is running it will show
/etc/init.d/svnserve status
svnserve.service - LSB: start and stop the svnserve daemon
Loaded: loaded (/etc/rc.d/init.d/svnserve)
Active: active (running) since Thu, 01 Aug 2013 12:14:27 +0530; 2h 19min ago
Process: 1655 ExecStart=/etc/rc.d/init.d/svnserve start (code=exited,
status=0/SUCCESS)
Main PID: 1658 (svnserve)
CGroup: name=systemd:/system/svnserve.service
â 1658 /usr/bin/svnserve --daemon --pid-file=/var/run/svnserve.pid
Now, your SVN server is ready.
Client Configuration
SVN checkout Login as a normal user
svn co svn://203/124/15.24/root/Repository/
This will create the Repository dir & sub_dirs.
You are ready to use SVN.
Try doing svn mkdir svn://localhost/myProject -m "some message" --username user --password password
and see if that makes a difference.
I would like add that in version 1.6.x of SVN, I had to change something in my authz file.
Before I used to have it like this:
[repository:/path/to/repo]
@authors = rw
@readers = r
But now for some reason that wouldn't work. I got authentication to work when I changed it to this:
[/]
@authors = rw
@readers = r
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With