开发者

SVN commit fails with "Authorization failed" error

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 Tortois开发者_运维问答eSVN, 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?


For me it was because of server migration. In svnserve.conf I forgot to uncomment:

auth-access = write
password-db = passwd


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.


My experience was similar to bluebrother I'd created a new repository correctly but hadn't setup the users properly. It let me Checkout but not Commit

Edit repoLocation/conf/svnserve.conf and uncomment the line

password-db = passwd

Edit repoLocation/conf/passwd and add a username and password to passwd for example

tim = password


I had the exact same issue with RapidSVN (or when using svn commit from the CLI). The issue turned out that I was checking out the repo using the Anonymous Subversion Access (the svn:// link):

svn checkout svn://svn.r-forge.r-project.org/svnroot/rsitesearch/

But when using this link for the repo you cannot commit changes. So the solution was to use the svn+ssh:// link allowing Developer Subversion Access via SSH:

svn checkout svn+ssh://developername@svn.r-forge.r-project.org/svnroot/rsitesearch/

With other SVN services, the correct link for commit could be https://. Actually I have better experience with the https:// checkout, so try that first.

Now svn commit should work as expected.

(This is the same solution as the one suggested by Wug in the comment to the OP.)


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.


If you are using svnserve to provide SVN access (i.e. your repository url looks like svn://server/repo), make sure your server is allowing write access. In some installations, the server is started with read-only access by default:

# The -R option enforces read-only access, i.e. write operations to the
# repository (such as commits) will not be allowed.
SVNSERVE_OPTIONS="-d -R -r /srv/svn/repos"


Check out your files using http protocol instead of svn protocol. I had the same issue as I was checking out the files using svn:// protocol. Later I changed the protocol to http:// and everything started working normal.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜