SVN commit fails with "Authorization failed" error

Viewed 61131

I am a new user with SVN, and I meet a problem on SVN commit command.

I use TortoiseSVN 1.6.6, and Ubuntu Subversion image with WMware as server.

I did create a repository on SVN server, and I can easily checkout files from the repository, but commit.

When I do commit, it always shows the problem.

Command: Commit  
Error: Commit failed (details follow):  
Error: Authorization failed  
Finished!:   

This problem only shows at local client with SVN server repository on VM. I tried creating repository on local machine with TortoiseSVN, and it is no problem on Commit. I also tried a working copy on server machine, it is no problem on Commit also.

Did anybody experience this issue? It is not any problem on Checkout from VM SVN server but it shows trouble on local client commit to VM server.

Should anything need to be setup I missed to do it?

11 Answers

It's the authorization that failed. That means the first step, the authentication was successful.

So: the username/password is correct and was accepted by your server. But then that user wasn't allowed to access the path/resource.

check your path based authorization file (conf/authz) and make sure that user has the rights.

If the server is using svnserve to serve the repository (which means you are using a svn:// URL) then you should check the file conf/svnserve.conf in the repository. The default configuration allows anonymous read, but only authenticated write accesses IIRC.

First of all, can you browse the repository from Tortoise? If you can, then the user account you are accessing the repository with doesn't have write (=commit) rights.

If you can neither browse not commit: It could be that Tortoise has stored the wrong authentication data on your client. I think it should ask for the credentials again in that case, but maybe it doesn't. Try this:

  1. Open your Start menu, go to the TortoiseSVN group

  2. Click "TortoiseSVN settings"

  3. Go to "Saved data"

  4. Click "Clear" in "Authentication data"

Tortoise will then forget all stored passwords, and should ask you again next time you try to access the VM.

Also, double check that the actual repository on the server has the correct file permissions to be written to by the server process (either svnserve or Apache). It's probably okay since you were able to create the repository in other ways, but it's worthwhile to check just in case.

note: I use sasl, and I found out the hard way that it's case sensitive, and expects lowercase usernames; i.e. "username123" won't match "USERNAME123" in your authz file, albeit they are spelled the same, so maybe check to make sure your usernames are lowercase (in your authz file)

It happened to me too. @Stefan is right. In [repo]/conf/svnserve.conf we can read:

If you don't specify an authz-db, no path-based access control is done.
Uncomment the line below to use the default authorization file.

just over authz-db = authz. So, just uncomment this, bring to an authorization failure.

Related