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

Re: push fails with return code 22

From
Jeff King <peff@peff.net>
Date
Apr 27, 2017, 20:18 UTC
Message-ID
<20170427201804.3abt5ht6dkwwqo4r@sigill.intra.peff.net>
In-Reply-To
<CAH6sfJUn99ezs-uZuYVj15qOeMv79ji7r0Ldvoreef0z3LzG8Q@mail.gmail.com>
On Thu, Apr 27, 2017 at 02:37:19PM -0400, Andrew Watson wrote:
> I'm trying to setup git with Smart HTTP so we can move off of SVN.
> 
> I've used the blog post: https://git-scm.com/blog/2010/03/04/smart-http.html

I'm not sure how that post will have aged. You might check your setup against the documentation in "git help http-backend", which is kept more up to date.

> My system is CentOS 7 which reports git version 1.8.3.1 and Apache
> 2.4.6. I also tried on Ubuntu 16.04 with git 2.7.4 and Apache 2.4.18.
> 
> Using GIT_CURL_VERBOSE I can see it fail after a PROPFIND.

That means the client isn't using smart-http. PROPFIND is part of the "dumb" http push-over-webdav.

So the problem is likely in the very first request Git makes to /info/refs/?service=git-receive-pack. The response there is what the client uses to decide whether the server understands smart-http or not.

> My stackoverflow post with all the debug info I could think of is
> here: http://stackoverflow.com/questions/43643152/git-push-results-in-return-code-22
I notice the response for that first request has:
  Content-Length: 0
  Content-Type: text/plain; charset=UTF-8
which implies to me that the git-http-backend CGI isn't being run.
-Peff
Previous: Andrew WatsonNext: Andrew Watson
Message 2 of 7 in “push fails with return code 22”
  1. Andrew WatsonApr 27, 2017
  2. Jeff KingApr 27, 2017
  3. Andrew WatsonApr 28, 2017
  4. Jeff KingApr 28, 2017
  5. Andrew WatsonApr 28, 2017
  6. Jeff KingApr 28, 2017
  7. Andrew WatsonApr 28, 2017

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.