git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PROPFIND 405 with git-http-backend and Smart HTTP
@ 2012-07-29 18:52 Bo98
  2012-07-30  1:00 ` Shawn Pearce
  0 siblings, 1 reply; 9+ messages in thread
From: Bo98 @ 2012-07-29 18:52 UTC (permalink / raw)
  To: git

I'm setting up a git server with git-http-backend and Smart HTTP but I'm
getting PROPFIND Error 405 with git push.

Here's my config:

    <VirtualHost *:8000>
      ServerName localhost
      DocumentRoot /opt/local/apache2/htdocs/repo

      SetEnv GIT_PROJECT_ROOT /opt/local/apache2/htdocs/repo
      SetEnv GIT_HTTP_EXPORT_ALL

      ScriptAlias /repo/ /usr/libexec/git-core/git-http-backend/
      AliasMatch ^/repo/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$         
/opt/local/apache2/htdocs/repo/$1
      AliasMatch ^/repo/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$
/opt/local/apache2/htdocs/repo/$1

      ScriptAliasMatch \
        "(?x)^/repo/(.*/(HEAD | \
        info/refs | \
        objects/(info/[^/]+ | \
            [0-9a-f]{2}/[0-9a-f]{38} | \
            pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
        git-(upload|receive)-pack))$" \
        /usr/libexec/git-core/git-http-backend/$1

      <LocationMatch "^/repo/.*/git-receive-pack$">
        AuthType Basic
        AuthName "Git"
        Require valid-user
        AuthUserFile /etc/apache2/other/htpasswd
      </LocationMatch>
    </VirtualHost>

And here's a snip from my access_log:

    ::1 - - [29/Jul/2012:18:34:34 +0100] "GET
/repo/myproject.git/info/refs?service=git-receive-pack HTTP/1.1" 200 117
    ::1 - - [29/Jul/2012:18:34:34 +0100] "GET /repo/myproject.git/HEAD
HTTP/1.1" 200 23
    ::1 - - [29/Jul/2012:18:34:34 +0100] "PROPFIND /repo/myproject.git/
HTTP/1.1" 405 247

Any ideas?



--
View this message in context: http://git.661346.n2.nabble.com/PROPFIND-405-with-git-http-backend-and-Smart-HTTP-tp7564017.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PROPFIND 405 with git-http-backend and Smart HTTP
  2012-07-29 18:52 PROPFIND 405 with git-http-backend and Smart HTTP Bo98
@ 2012-07-30  1:00 ` Shawn Pearce
  2012-07-30  8:40   ` Bo98
  0 siblings, 1 reply; 9+ messages in thread
From: Shawn Pearce @ 2012-07-30  1:00 UTC (permalink / raw)
  To: Bo98; +Cc: git

On Sun, Jul 29, 2012 at 11:52 AM, Bo98 <BoEllisAnderson@aol.com> wrote:
> I'm setting up a git server with git-http-backend and Smart HTTP but I'm
> getting PROPFIND Error 405 with git push.

This suggests the client didn't see the server as one supporting smart HTTP.
...
>
> And here's a snip from my access_log:
>
>     ::1 - - [29/Jul/2012:18:34:34 +0100] "GET
> /repo/myproject.git/info/refs?service=git-receive-pack HTTP/1.1" 200 117

Was this request actually served using the smart http-backend? Try the
request yourself on the command line with curl, making sure to pass
the ?service=git-receive-pack query parameter. A smart HTTP response
will include a service=git-receive-pack line as the first line of the
response body. I don't think Apache called the http-backend CGI, and
so the client thought the server was not smart HTTP capable.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PROPFIND 405 with git-http-backend and Smart HTTP
  2012-07-30  1:00 ` Shawn Pearce
@ 2012-07-30  8:40   ` Bo98
  2012-07-30 16:37     ` Shawn Pearce
  0 siblings, 1 reply; 9+ messages in thread
From: Bo98 @ 2012-07-30  8:40 UTC (permalink / raw)
  To: git


Shawn Pearce wrote
> 
>> And here's a snip from my access_log:
>>
>>     ::1 - - [29/Jul/2012:18:34:34 +0100] "GET
>> /repo/myproject.git/info/refs?service=git-receive-pack HTTP/1.1" 200 117
> 
> Was this request actually served using the smart http-backend? Try the
> request yourself on the command line with curl, making sure to pass
> the ?service=git-receive-pack query parameter. A smart HTTP response
> will include a service=git-receive-pack line as the first line of the
> response body. I don't think Apache called the http-backend CGI, and
> so the client thought the server was not smart HTTP capable.
> 

This is what curl returned:

2ddf56592a0f55456b8c42dc9f2cb9289f083f53	refs/heads/1.0.x
55079bb13d9af8a9164ad0d24b654cbfe119bc7e	refs/heads/master

Looks okay. Those are the 2 branches I've got.



--
View this message in context: http://git.661346.n2.nabble.com/PROPFIND-405-with-git-http-backend-and-Smart-HTTP-tp7564017p7564056.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PROPFIND 405 with git-http-backend and Smart HTTP
  2012-07-30  8:40   ` Bo98
@ 2012-07-30 16:37     ` Shawn Pearce
  2012-07-30 20:30       ` Bo98
  0 siblings, 1 reply; 9+ messages in thread
From: Shawn Pearce @ 2012-07-30 16:37 UTC (permalink / raw)
  To: Bo98; +Cc: git

On Mon, Jul 30, 2012 at 1:40 AM, Bo98 <BoEllisAnderson@aol.com> wrote:
>
> Shawn Pearce wrote
>>
>>> And here's a snip from my access_log:
>>>
>>>     ::1 - - [29/Jul/2012:18:34:34 +0100] "GET
>>> /repo/myproject.git/info/refs?service=git-receive-pack HTTP/1.1" 200 117
>>
>> Was this request actually served using the smart http-backend? Try the
>> request yourself on the command line with curl, making sure to pass
>> the ?service=git-receive-pack query parameter. A smart HTTP response
>> will include a service=git-receive-pack line as the first line of the
>> response body. I don't think Apache called the http-backend CGI, and
>> so the client thought the server was not smart HTTP capable.
>>
>
> This is what curl returned:
>
> 2ddf56592a0f55456b8c42dc9f2cb9289f083f53        refs/heads/1.0.x
> 55079bb13d9af8a9164ad0d24b654cbfe119bc7e        refs/heads/master
>
> Looks okay. Those are the 2 branches I've got.

No, a smart HTTP response looks more like this:

1e# service=git-receive-pack
000000a5e7a3bcbbb8083e812ce07a5459f0e6d30edfb9fe HEAD include-tag
multi_ack_detailed multi_ack ofs-delta side-band side-band-64k
thin-pack no-progress shallow no-done

Looks like Apache isn't calling the smart-http CGI.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PROPFIND 405 with git-http-backend and Smart HTTP
  2012-07-30 16:37     ` Shawn Pearce
@ 2012-07-30 20:30       ` Bo98
  2012-07-30 20:42         ` Shawn Pearce
  0 siblings, 1 reply; 9+ messages in thread
From: Bo98 @ 2012-07-30 20:30 UTC (permalink / raw)
  To: git


Shawn Pearce wrote
> 
> No, a smart HTTP response looks more like this:
> 
> 1e# service=git-receive-pack
> 000000a5e7a3bcbbb8083e812ce07a5459f0e6d30edfb9fe HEAD include-tag
> multi_ack_detailed multi_ack ofs-delta side-band side-band-64k
> thin-pack no-progress shallow no-done
> 
> Looks like Apache isn't calling the smart-http CGI.
> 

Oh ok, thanks! But do you have any idea why? Everything in my config looks
okay to me. I've got my GIT_PROJECT_ROOT, my GIT_HTTP_EXPORT_ALL, my
ScriptAlias and my LocationMatch. I'm not sure why it's like this.




--
View this message in context: http://git.661346.n2.nabble.com/PROPFIND-405-with-git-http-backend-and-Smart-HTTP-tp7564017p7564137.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PROPFIND 405 with git-http-backend and Smart HTTP
  2012-07-30 20:30       ` Bo98
@ 2012-07-30 20:42         ` Shawn Pearce
  2012-07-30 21:39           ` Bo98
  0 siblings, 1 reply; 9+ messages in thread
From: Shawn Pearce @ 2012-07-30 20:42 UTC (permalink / raw)
  To: Bo98; +Cc: git

On Mon, Jul 30, 2012 at 1:30 PM, Bo98 <BoEllisAnderson@aol.com> wrote:
>
> Shawn Pearce wrote
>>
>> No, a smart HTTP response looks more like this:
>>
>> 1e# service=git-receive-pack
>> 000000a5e7a3bcbbb8083e812ce07a5459f0e6d30edfb9fe HEAD include-tag
>> multi_ack_detailed multi_ack ofs-delta side-band side-band-64k
>> thin-pack no-progress shallow no-done
>>
>> Looks like Apache isn't calling the smart-http CGI.
>>
>
> Oh ok, thanks! But do you have any idea why? Everything in my config looks
> okay to me. I've got my GIT_PROJECT_ROOT, my GIT_HTTP_EXPORT_ALL, my
> ScriptAlias and my LocationMatch. I'm not sure why it's like this.

Maybe you forgot to enable ExecCGI?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PROPFIND 405 with git-http-backend and Smart HTTP
  2012-07-30 20:42         ` Shawn Pearce
@ 2012-07-30 21:39           ` Bo98
  2012-08-05 18:30             ` Drew Northup
  0 siblings, 1 reply; 9+ messages in thread
From: Bo98 @ 2012-07-30 21:39 UTC (permalink / raw)
  To: git


Shawn Pearce wrote
> 
> Maybe you forgot to enable ExecCGI?
> 

Whoops, completely forgot about that, but, assuming I did it right, it still
doesn't seem to work.

Here's what I did:

  <Directory "/usr/libexec/git-core/">
    Options +ExecCGI
    Allow From All
  </Directory>



--
View this message in context: http://git.661346.n2.nabble.com/PROPFIND-405-with-git-http-backend-and-Smart-HTTP-tp7564017p7564144.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PROPFIND 405 with git-http-backend and Smart HTTP
  2012-07-30 21:39           ` Bo98
@ 2012-08-05 18:30             ` Drew Northup
  2014-08-14 10:23               ` lpicquet
  0 siblings, 1 reply; 9+ messages in thread
From: Drew Northup @ 2012-08-05 18:30 UTC (permalink / raw)
  To: Bo98; +Cc: git, Shawn Pearce

On Mon, Jul 30, 2012 at 5:39 PM, Bo98 <BoEllisAnderson@aol.com> wrote:
>
> Shawn Pearce wrote
>> Maybe you forgot to enable ExecCGI?
>>
> Whoops, completely forgot about that, but, assuming I did it right, it still
> doesn't seem to work.
>
> Here's what I did:
>
>   <Directory "/usr/libexec/git-core/">
>     Options +ExecCGI
>     Allow From All
>   </Directory>

Are all directory permissions set right? Is SELINUX enabled, and if so
are all of the contexts set correctly? Does your Apache configuration
recognize things NOT spelled *.cgi as CGI scripts / programs?

Besides, once you start asking Apache to do things outside of the base
Document Root all sorts of interesting possibilities for failure
become available.

I am pretty sure that this isn't a Git problem, it is a CGI hosting /
configuration problem. An Apache-centric list may be able to help you
better and is likely a better place to ask.

-- 
-Drew Northup
--------------------------------------------------------------
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PROPFIND 405 with git-http-backend and Smart HTTP
  2012-08-05 18:30             ` Drew Northup
@ 2014-08-14 10:23               ` lpicquet
  0 siblings, 0 replies; 9+ messages in thread
From: lpicquet @ 2014-08-14 10:23 UTC (permalink / raw)
  To: git

You need to allow the directory to be read?
	<directory Path/to/your/repositories>
  		Allow from all
	</directory>




--
View this message in context: http://git.661346.n2.nabble.com/PROPFIND-405-with-git-http-backend-and-Smart-HTTP-tp7564017p7616843.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-08-14 10:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-29 18:52 PROPFIND 405 with git-http-backend and Smart HTTP Bo98
2012-07-30  1:00 ` Shawn Pearce
2012-07-30  8:40   ` Bo98
2012-07-30 16:37     ` Shawn Pearce
2012-07-30 20:30       ` Bo98
2012-07-30 20:42         ` Shawn Pearce
2012-07-30 21:39           ` Bo98
2012-08-05 18:30             ` Drew Northup
2014-08-14 10:23               ` lpicquet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).