Home > Subversion > Subversion “failed to authorize” issue solved

Subversion “failed to authorize” issue solved

After doing a clean Subversion installation and basic Apache configuration, I tried tapping into it with AhnkSVN, only to receive this error: “You failed to authorize against the remote repository”. This was odd, it was authenticated enough to list the repository? The problem occured when I tried adding my solution to the repository. Packet captures did not reveal anything terribly useful. I then installed Tortoise SVN to give that a try. Still no dice. It was complaining about not being able to access a lock file on the server. That was the clue I needed! It turns out, I had created the SVN repository on the server as root (it’s a FreeBSD server), but the user that Apache ran as did not have access to that directory. After a quick chgrp -R and chown -R on the repository directory, all was well.

J.Ja

Categories: Subversion Tags:
  1. September 20th, 2009 at 03:04 | #1

    Ah. permissions. Yep.
    A “chown -R user:group directory” suffices in Linux.
    Another story with a ‘happy ending’.

  2. September 20th, 2009 at 05:42 | #2

    @Dietrich Schmitz

    Thanks for the tip on combining chown and chgrp, it never occured to me that I could do it in one command, that will make my life slightly happier from here on out! Pretty annoyed that my Subversion repository has to be owned by Apache. I suppose the alternative is to set up an entirely seperate Apache instance running as a different user, or to just chmod 777 the repository, neither of which are great options either.

    The ending to this wasn’t *too* happy. Afterwards, I discovered that both TortoiseSVN and AhnkSVN are pretty lousy clients, and they did some bizarro things. It took me an hour of fiddling to get my system to get its data in the repository in a useable condition AND actually recognize that it was checked in. First I had to bring it into SVN, and then create a seperate local WC tree, it was a mess.

    This is one area where IIS beats Apache in my mind, much more flexible on this stuff.

    J.Ja

  3. May 17th, 2010 at 22:55 | #3

    I am on windows server 2003 having same problem without any luck. But I could browse without assigning any password but when I commit throws the same message. I even tried anon-access = write but didn’t work!

  1. No trackbacks yet.