git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Fail to push over HTTP with MySQL authentication (Apache2)

From
Jeff King <peff@peff.net>
Date
Dec 29, 2012, 21:01 UTC
Message-ID
<20121229210128.GB21058@sigill.intra.peff.net>
In-Reply-To
<50DF4A78.5000206@gmail.com>
On Sat, Dec 29, 2012 at 08:54:32PM +0100, Davide Baldini wrote:
Show 9 quoted lines
> SETUP:
> -----
> [...]
> 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.

Should this last line be a "chmod -R"? Git init will create many subdirectories, and you want to make sure they are all writable for push.

Show 8 quoted lines
> _   Git:
>         Git can fetch the repository without problems:
>         git clone http://username:password@greatturn.org:8081/GT00.git
> 
> Pushing the locally fetched repository back to the remote one doesn't
> work:
> [...]
> > 87.19.240.177 - - [29/Dec/2012:16:43:26 +0100] "PROPFIND /GT00.git/ HTTP/1.1" 401 767 "-" "git/1.7.8.3"

If fetch is working and push is not, I'd suspect WebDAV configuration problems (and indeed, your credentials seem fine, but the PROPFIND is returning a 401). Fetch works over stock HTTP and does not use WebDAV at all. There is some documentation on setting up DAV here:

  https://github.com/git/git/blob/master/Documentation/howto/setup-git-server-over-http.txt
but I have no idea if it is up-to-date or not.

However, before trying to investigate that avenue, have you considered using git's smart-http backend instead of WebDAV? It's significantly more efficient. You can get details and example apache configuration from "git help http-backend".

-Peff
Previous: Davide BaldiniNext: Davide Baldini
Message 2 of 3 in “Fail to push over HTTP with MySQL authentication (Apache2)”
  1. Davide BaldiniDec 29, 2012
  2. Jeff KingDec 29, 2012
  3. Davide BaldiniDec 30, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.