I'm not able to setup a public Git repository over plain HTTP with
MySQL authentication.
Both HTTP and authentication are provided by Apache2.


This setup is performed on Debian 6.0.4.

Apache2 (v. 2.2), with modules:

Git (v.
Git repository location:
    local, for webserver: /var/www/public/GT_rulesets/GT00.git
    public, for Git:      http://greatturn.org:8081/GT00.git

Git repository has been configured as:
    cd /var/www/public/GT_rulesets/GT00.git
    git init --bare
    mv hooks/post-update.sample hooks/post-update
    git update server-info
    chmode 777 /var/www/public/GT_rulesets/GT00.git  # for testing.


The Apache side of my setup seems to work:
_   HTTP, MySQL authentication:
        I point Iceweasel to http://greatturn.org:8081/ .
        It asks for authentication; I authenticate with a username/
        password pair taken from MySQL database (which doesn't exist as
        a system user); It works, and I can see all the content of
        the git repository "GT00.git".
_   WebDAV:
        I point Konqueror to webdav://greatturn.org:8081/ .
        Works exactly as previous point.
_   Git:
        Git can fetch the repository without problems:
        git clone http://username:passw...@greatturn.org:8081/GT00.git

Pushing the locally fetched repository back to the remote one doesn't
    "git push http://greatturn.org:8081/GT00.git master"
    asks for username and password:
        > Username for 'greatturn.org:8081':
        > Password for 'greatturn.org:8081':

    I enter my credentials, then git outputs the following and exits:
        > error: Cannot access URL http://greatturn.org:8081/GT00.git/,
return code 22
        > fatal: git-http-push failed

    On Apache's access.log, git produces all and no more than the
        > - - [29/Dec/2012:16:43:22 +0100] "GET
/GT00.git/info/refs?service=git-receive-pack HTTP/1.1" 401 767 "-"
        > - - [29/Dec/2012:16:43:26 +0100] "GET
/GT00.git/info/refs?service=git-receive-pack HTTP/1.1" 401 767 "-"
        > - davide [29/Dec/2012:16:43:26 +0100] "GET
/GT00.git/info/refs?service=git-receive-pack HTTP/1.1" 200 233 "-"
        > - davide [29/Dec/2012:16:43:26 +0100] "GET
/GT00.git/HEAD HTTP/1.1" 200 258 "-" "git/"
        > - - [29/Dec/2012:16:43:26 +0100] "PROPFIND
/GT00.git/ HTTP/1.1" 401 767 "-" "git/"


Reply via email to