# git-receive-pack missing credentials ?

6 messages from 2011-11-07 to 2011-11-16. Participants: François Dagorn, Tay Ray Chuan, Geoff Mets.
Thread: https://gitlist.dev/t/28875

## François Dagorn, 2011-11-07 15:33

Subject: git-receive-pack missing credentials ?
Message-ID: <4EB7FA3A.8070908@univ-rennes1.fr>
URL: https://gitlist.dev/e/4EB7FA3A.8070908%40univ-rennes1.fr

```
Hello all,

I'm experiencing problems when trying to set up a git repository
managed by git-http-backend. I've done the following :

- on the server side

     cd /git
     mkdir test13
     git --bare init .
         >>> Initialized empty Git repository in /git/test13

     /usr/local/libexec/git-core/git-update-server-info
     chown -R apache.apache .

- on the client side

    cd (project-directory)
    $ git init
    $ (add some files)
    $ git add .
    $ git commit -m 'Initial commit'
    git push http://git.istic.smw.fr/test13 master

        Username:
        Password:
        error: Cannot access URL http://git.istic.smw.fr/test13/, return code 22
        fatal: git-http-push failed

- apache acces_log

 1) ip-address - metheuser [07/Nov/2011:16:17:31 +0100]
    "GET /test13/info/refs?service=git-     receive-pack HTTP/1.1" 200 - "-" "git/1.7.3.4"
 2) ip-address - metheuser [07/Nov/2011:16:17:32 +0100]
    "GET /test13/HEAD HTTP/1.1" 200 23 "-" "git/1.7.3.4"
 3) ip-address - - [07/Nov/2011:16:17:32 +0100]
    "PROPFIND /test13/ HTTP/1.1" 401 492 "-" "git/1.7.3.4"

- what sounds strange to me : the 2 firsts requests are generated by my client side
  (wireshark used as a clue) but the third comes from the server side and the users
  credentials are missed !

- And also, I was hoping to use smart httpd and so the generated PROPFIND (DAV)
  is amazing.

Any help would be appreciated.

Cheers.

François Dagorn
Université de rennes 1
France

```

## Tay Ray Chuan, 2011-11-07 17:02

Subject: Re: git-receive-pack missing credentials ?
Message-ID: <CALUzUxpiOoY3Qy0oXzgioBGkZyBF_vpHV3OHm-DWfChR9pPHHA@mail.gmail.com>
URL: https://gitlist.dev/e/CALUzUxpiOoY3Qy0oXzgioBGkZyBF_vpHV3OHm-DWfChR9pPHHA%40mail.gmail.com
In-Reply-To: <4EB7FA3A.8070908@univ-rennes1.fr>

```
On Mon, Nov 7, 2011 at 11:33 PM, François Dagorn
<Francois.Dagorn@univ-rennes1.fr> wrote:
> - on the client side
>
>    cd (project-directory)
>    $ git init
>    $ (add some files)
>    $ git add .
>    $ git commit -m 'Initial commit'
>    git push http://git.istic.smw.fr/test13 master
>
>        Username:
>        Password:
>        error: Cannot access URL http://git.istic.smw.fr/test13/, return code 22
>        fatal: git-http-push failed
>
> - apache acces_log
>
>  1) ip-address - metheuser [07/Nov/2011:16:17:31 +0100]
>    "GET /test13/info/refs?service=git-     receive-pack HTTP/1.1" 200 - "-" "git/1.7.3.4"
>  2) ip-address - metheuser [07/Nov/2011:16:17:32 +0100]
>    "GET /test13/HEAD HTTP/1.1" 200 23 "-" "git/1.7.3.4"
>  3) ip-address - - [07/Nov/2011:16:17:32 +0100]
>    "PROPFIND /test13/ HTTP/1.1" 401 492 "-" "git/1.7.3.4"
>
> - what sounds strange to me : the 2 firsts requests are generated by my client side
>  (wireshark used as a clue) but the third comes from the server side and the users
>  credentials are missed !

Can you update your git installation and try again? v1.7.3.4 sounds
pretty old (almost a year).

-- 
Cheers,
Ray Chuan

```

## François Dagorn, 2011-11-08 08:26

Subject: Re: git-receive-pack missing credentials ?
Message-ID: <loom.20111108T091907-908@post.gmane.org>
URL: https://gitlist.dev/e/loom.20111108T091907-908%40post.gmane.org
In-Reply-To: <CALUzUxpiOoY3Qy0oXzgioBGkZyBF_vpHV3OHm-DWfChR9pPHHA@mail.gmail.com>

```
Tay Ray Chuan <rctay89 <at> gmail.com> writes:

> 
> On Mon, Nov 7, 2011 at 11:33 PM, François Dagorn

> 
> Can you update your git installation and try again? v1.7.3.4 sounds
> pretty old (almost a year).
> 


On the server side I'm using the last 1.7.7.2 and 1.7.3.4 is on
the client side used for testing. 

When apache is configured to serve without authentication, everything
is ok !

PS: I don't know where to report but there are mistakes (IMHO) in the
git-http-backend man page : the LocationMatch directive cannot be used 
to restrict access to "receive-pack" because "receive-pack" does not
take part of the URL but only in the QUERY_STRING.


GET /test13/info/refs?service=git-receive-pack
                    ****

Cheers.

François

```

## François Dagorn, 2011-11-08 10:17

Subject: Re: git-receive-pack missing credentials ?
Message-ID: <loom.20111108T111508-171@post.gmane.org>
URL: https://gitlist.dev/e/loom.20111108T111508-171%40post.gmane.org
In-Reply-To: <loom.20111108T091907-908@post.gmane.org>

```
François Dagorn <Francois.Dagorn <at> univ-rennes1.fr> writes:

What happens : git-http-backend is not called at all !

ScriptAlias /git/ /usr/local/libexec/git-core/git-httpd-backend/

is not relevant, I don't know why.

François

```

## François Dagorn, 2011-11-08 10:50

Subject: Re: git-receive-pack missing credentials ?
Message-ID: <loom.20111108T114722-414@post.gmane.org>
URL: https://gitlist.dev/e/loom.20111108T114722-414%40post.gmane.org
In-Reply-To: <4EB7FA3A.8070908@univ-rennes1.fr>

```
It was an ExecCGI issue :

when adding "Options ExecCGI" on the
directory hosting git repositories, everything was ok.

François

```

## Geoff Mets, 2011-11-16 17:19

Subject: Re: git-receive-pack missing credentials ?
Message-ID: <1321463941686-7001142.post@n2.nabble.com>
URL: https://gitlist.dev/e/1321463941686-7001142.post%40n2.nabble.com
In-Reply-To: <loom.20111108T114722-414@post.gmane.org>

```
Hi Francois

Reading this thread mirrored the exact problems I'm seeing but sadly your
solution adding +ExecCGI didn't fix it.

I'm guessing, like you, it's probably an apache config issue. Could you
share your working apache.conf

Many thanks ..............Geoff

--
View this message in context: http://git.661346.n2.nabble.com/git-receive-pack-missing-credentials-tp6970872p7001142.html
Sent from the git mailing list archive at Nabble.com.

```
