Subject: git-http-backend: anonymous read, authenticated write

From: Magnus Therning <[email-masked]>
Date: Tue, 9 Apr 2013 07:45:53 +0200

I've been trying to set up git-http-backend+lighttpd.  I've managed to
set up anonymous read-only access, and I then successfully configured
authentication for both read and write.  Then I get stuck.  The
man-page for git-http-backend says that the following snippet can be
used for Apache 2.x:

    <LocationMatch "^/git/.*/git-receive-pack$">
        AuthType Basic
        AuthName "Git Access"
        Require group committers
        ...
    </LocationMatch>

However, when I put in this match on location in my lighty config and
try to push I'm not asked for a password, instead I'm greeted with

    % git push 
    error: The requested URL returned error: 403 Forbidden while accessing http://[email-masked]/git/foo.git/info/refs?service=git-receive-pack

AFAICS this means the man-page is wrong, and that I instead ought to
match on the "service=git-receive-pack" part.  Is that a correct
conclusion?

/M

-- 
Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: [email-masked]   jabber: [email-masked]
twitter: magthe               http://therning.org/magnus

I invented the term Object-Oriented, and I can tell you I did not have
C++ in mind.
     -- Alan Kay