# Problems with git over http

7 messages from 2008-09-20 to 2008-09-21. Participants: Sean Davis, Uwe Kleine-König, Jakub Narebski, Matthieu Moy.
Thread: https://gitlist.dev/t/15605

## Sean Davis, 2008-09-20 17:13

Subject: Problems with git over http
Message-ID: <264855a00809201013h6003abbfr9bbdd20c92e9201d@mail.gmail.com>
URL: https://gitlist.dev/e/264855a00809201013h6003abbfr9bbdd20c92e9201d%40mail.gmail.com

```
I am new to git and trying to set up a remote repository over http.  I
have configured apache2 and the bare, empty repository.  Using curl, I
can get the file HEAD without a password (seems .netrc is correct?).
However, when I try to push to the repository, I get the following:

sdavis@lestrade:/tmp/testing> git push
http://sdavis@watson.nci.nih.gov/git/sean_git.git/ master
fatal: exec http-push failed.
error: failed to push some refs to
'http://sdavis@watson.nci.nih.gov/git/sean_git.git/'

What can I do to try to debug this, as the error message isn't helping
me to sort out what is wrong.  The client and server are both running
git-1.5.x (although the minor versions are a bit different).  Any
suggestions?

Thanks,
Sean

```

## Uwe Kleine-König, 2008-09-20 18:42

Subject: Re: Problems with git over http
Message-ID: <20080920184257.GD18932@strlen.de>
URL: https://gitlist.dev/e/20080920184257.GD18932%40strlen.de
In-Reply-To: <264855a00809201013h6003abbfr9bbdd20c92e9201d@mail.gmail.com>

```
Hello Sean,

On Sat, Sep 20, 2008 at 01:13:53PM -0400, Sean Davis wrote:
> I am new to git and trying to set up a remote repository over http.  I
> have configured apache2 and the bare, empty repository.  Using curl, I
> can get the file HEAD without a password (seems .netrc is correct?).
> However, when I try to push to the repository, I get the following:
> 
> sdavis@lestrade:/tmp/testing> git push
> http://sdavis@watson.nci.nih.gov/git/sean_git.git/ master
> fatal: exec http-push failed.
> error: failed to push some refs to
> 'http://sdavis@watson.nci.nih.gov/git/sean_git.git/'
> 
> What can I do to try to debug this, as the error message isn't helping
> me to sort out what is wrong.  The client and server are both running
> git-1.5.x (although the minor versions are a bit different).  Any
> suggestions?
Try cloning first.  And check the error log of apache.  I don't know how
pushing over http works, but maybe you installed git into /usr/local and
/usr/local/bin is not in the PATH for the apache user?

Best regards
Uwe

```

## Sean Davis, 2008-09-20 20:40

Subject: Re: Problems with git over http
Message-ID: <264855a00809201340r397d2901h14a7e33a3eed5f06@mail.gmail.com>
URL: https://gitlist.dev/e/264855a00809201340r397d2901h14a7e33a3eed5f06%40mail.gmail.com
In-Reply-To: <20080920184257.GD18932@strlen.de>

```
On Sat, Sep 20, 2008 at 2:42 PM, Uwe Kleine-König <ukleinek@strlen.de> wrote:
> Hello Sean,
>
> On Sat, Sep 20, 2008 at 01:13:53PM -0400, Sean Davis wrote:
>> I am new to git and trying to set up a remote repository over http.  I
>> have configured apache2 and the bare, empty repository.  Using curl, I
>> can get the file HEAD without a password (seems .netrc is correct?).
>> However, when I try to push to the repository, I get the following:
>>
>> sdavis@lestrade:/tmp/testing> git push
>> http://sdavis@watson.nci.nih.gov/git/sean_git.git/ master
>> fatal: exec http-push failed.
>> error: failed to push some refs to
>> 'http://sdavis@watson.nci.nih.gov/git/sean_git.git/'
>>
>> What can I do to try to debug this, as the error message isn't helping
>> me to sort out what is wrong.  The client and server are both running
>> git-1.5.x (although the minor versions are a bit different).  Any
>> suggestions?
> Try cloning first.  And check the error log of apache.  I don't know how
> pushing over http works, but maybe you installed git into /usr/local and
> /usr/local/bin is not in the PATH for the apache user?

Thanks, Uwe.  Good idea.  On the client:

orf-01569049:/tmp sdavis$ git clone
http://sdavis@watson.nci.nih.gov/git/sean_git.git/
Initialized empty Git repository in /tmp/sean_git/.git/
cat: /tmp/sean_git/.git/refs/remotes/origin/master: No such file or directory
/usr/local/bin/git-clone: line 4: cd:
/tmp/sean_git/.git/refs/remotes/origin: No such file or directory
fatal: Not a valid object name HEAD

Nothing in the error_log on apache.  Why would git be looking for a
remotes origin since I am cloning from a remote source?

Sean

```

## Jakub Narebski, 2008-09-20 21:42

Subject: Re: Problems with git over http
Message-ID: <m3wsh6lck1.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3wsh6lck1.fsf%40localhost.localdomain
In-Reply-To: <264855a00809201013h6003abbfr9bbdd20c92e9201d@mail.gmail.com>

```
"Sean Davis" <sdavis2@mail.nih.gov> writes:

> I am new to git and trying to set up a remote repository over http.  I
> have configured apache2 and the bare, empty repository.  Using curl, I
> can get the file HEAD without a password (seems .netrc is correct?).
> However, when I try to push to the repository, I get the following:
> 
> sdavis@lestrade:/tmp/testing> git push
> http://sdavis@watson.nci.nih.gov/git/sean_git.git/ master
> fatal: exec http-push failed.
> error: failed to push some refs to
> 'http://sdavis@watson.nci.nih.gov/git/sean_git.git/'

Errr... to _push_ via https you have to enable WebDAV.
See Documentation/howto/setup-git-server-over-http.txt
-- 
Jakub Narebski
Poland
ShadeHawk on #git

```

## Sean Davis, 2008-09-20 22:27

Subject: Re: Problems with git over http
Message-ID: <264855a00809201527l1b5d99bdr85d96771d8a9efd4@mail.gmail.com>
URL: https://gitlist.dev/e/264855a00809201527l1b5d99bdr85d96771d8a9efd4%40mail.gmail.com
In-Reply-To: <m3wsh6lck1.fsf@localhost.localdomain>

```
On Sat, Sep 20, 2008 at 5:42 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> "Sean Davis" <sdavis2@mail.nih.gov> writes:
>
>> I am new to git and trying to set up a remote repository over http.  I
>> have configured apache2 and the bare, empty repository.  Using curl, I
>> can get the file HEAD without a password (seems .netrc is correct?).
>> However, when I try to push to the repository, I get the following:
>>
>> sdavis@lestrade:/tmp/testing> git push
>> http://sdavis@watson.nci.nih.gov/git/sean_git.git/ master
>> fatal: exec http-push failed.
>> error: failed to push some refs to
>> 'http://sdavis@watson.nci.nih.gov/git/sean_git.git/'
>
> Errr... to _push_ via https you have to enable WebDAV.
> See Documentation/howto/setup-git-server-over-http.txt

WebDAV is enabled and authentication is working.

Sean

```

## Matthieu Moy, 2008-09-21 16:25

Subject: Re: Problems with git over http
Message-ID: <vpqskrto48n.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpqskrto48n.fsf%40bauges.imag.fr
In-Reply-To: <264855a00809201013h6003abbfr9bbdd20c92e9201d@mail.gmail.com>

```
"Sean Davis" <sdavis2@mail.nih.gov> writes:

> I am new to git and trying to set up a remote repository over http.  I
> have configured apache2 and the bare, empty repository.  Using curl, I
> can get the file HEAD without a password (seems .netrc is correct?).
> However, when I try to push to the repository, I get the following:
>
> sdavis@lestrade:/tmp/testing> git push
> http://sdavis@watson.nci.nih.gov/git/sean_git.git/ master
> fatal: exec http-push failed.

Do you have git-http-push somewhere? What does "git http-push" say?

Probably you have a version of Git compiled with a too old libcurl
(IIRC, it could have "worked", but a bug in the old libcurl could
cause repository corruption, and therefore, git refuses to build
http-push with such version of libcurl).

-- 
Matthieu

```

## Sean Davis, 2008-09-21 20:51

Subject: Re: Problems with git over http
Message-ID: <264855a00809211351j1392ad97xf2cd98944014edc@mail.gmail.com>
URL: https://gitlist.dev/e/264855a00809211351j1392ad97xf2cd98944014edc%40mail.gmail.com
In-Reply-To: <vpqskrto48n.fsf@bauges.imag.fr>

```
On Sun, Sep 21, 2008 at 12:25 PM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
> "Sean Davis" <sdavis2@mail.nih.gov> writes:
>
>> I am new to git and trying to set up a remote repository over http.  I
>> have configured apache2 and the bare, empty repository.  Using curl, I
>> can get the file HEAD without a password (seems .netrc is correct?).
>> However, when I try to push to the repository, I get the following:
>>
>> sdavis@lestrade:/tmp/testing> git push
>> http://sdavis@watson.nci.nih.gov/git/sean_git.git/ master
>> fatal: exec http-push failed.
>
> Do you have git-http-push somewhere? What does "git http-push" say?
>
> Probably you have a version of Git compiled with a too old libcurl
> (IIRC, it could have "worked", but a bug in the old libcurl could
> cause repository corruption, and therefore, git refuses to build
> http-push with such version of libcurl).

That was dumb on my part.  That is, indeed, an issue.  Both the mac
binary that I found and the rpm for opensuse do not include
git-http-push.

Sean

```
