{"thread":{"id":"31131","subject":"PROPFIND 405 with git-http-backend and Smart HTTP","startedAt":"2012-07-29T18:52:46Z","lastAt":"2014-08-14T10:23:14Z","messageCount":9,"participants":["Bo98","Shawn Pearce","Drew Northup","lpicquet"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"196073","messageId":"1343587966493-7564017.post@n2.nabble.com","threadId":"31131","inReplyTo":null,"subject":"PROPFIND 405 with git-http-backend and Smart HTTP","fromName":"Bo98","fromEmail":"boellisanderson@aol.com","sentAt":"2012-07-29T18:52:46Z","receivedAt":"2012-07-29T18:52:46Z","isPatch":false,"sender":{"key":"boellisanderson@aol.com","avatar":null},"body":"I'm setting up a git server with git-http-backend and Smart HTTP but I'm\ngetting PROPFIND Error 405 with git push.\n\nHere's my config:\n\n    <VirtualHost *:8000>\n      ServerName localhost\n      DocumentRoot /opt/local/apache2/htdocs/repo\n\n      SetEnv GIT_PROJECT_ROOT /opt/local/apache2/htdocs/repo\n      SetEnv GIT_HTTP_EXPORT_ALL\n\n      ScriptAlias /repo/ /usr/libexec/git-core/git-http-backend/\n      AliasMatch ^/repo/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$         \n/opt/local/apache2/htdocs/repo/$1\n      AliasMatch ^/repo/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$\n/opt/local/apache2/htdocs/repo/$1\n\n      ScriptAliasMatch \\\n        \"(?x)^/repo/(.*/(HEAD | \\\n        info/refs | \\\n        objects/(info/[^/]+ | \\\n            [0-9a-f]{2}/[0-9a-f]{38} | \\\n            pack/pack-[0-9a-f]{40}\\.(pack|idx)) | \\\n        git-(upload|receive)-pack))$\" \\\n        /usr/libexec/git-core/git-http-backend/$1\n\n      <LocationMatch \"^/repo/.*/git-receive-pack$\">\n        AuthType Basic\n        AuthName \"Git\"\n        Require valid-user\n        AuthUserFile /etc/apache2/other/htpasswd\n      </LocationMatch>\n    </VirtualHost>\n\nAnd here's a snip from my access_log:\n\n    ::1 - - [29/Jul/2012:18:34:34 +0100] \"GET\n/repo/myproject.git/info/refs?service=git-receive-pack HTTP/1.1\" 200 117\n    ::1 - - [29/Jul/2012:18:34:34 +0100] \"GET /repo/myproject.git/HEAD\nHTTP/1.1\" 200 23\n    ::1 - - [29/Jul/2012:18:34:34 +0100] \"PROPFIND /repo/myproject.git/\nHTTP/1.1\" 405 247\n\nAny ideas?\n\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/PROPFIND-405-with-git-http-backend-and-Smart-HTTP-tp7564017.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"196093","messageId":"CAJo=hJtB6OQ8+8Q_JgPoAntOdQ=Z0tOERYRD7wJ0LRLgacYA8A@mail.gmail.com","threadId":"31131","inReplyTo":"1343587966493-7564017.post@n2.nabble.com","subject":"Re: PROPFIND 405 with git-http-backend and Smart HTTP","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2012-07-30T01:00:44Z","receivedAt":"2012-07-30T01:00:44Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"On Sun, Jul 29, 2012 at 11:52 AM, Bo98 <BoEllisAnderson@aol.com> wrote:\n> I'm setting up a git server with git-http-backend and Smart HTTP but I'm\n> getting PROPFIND Error 405 with git push.\n\nThis suggests the client didn't see the server as one supporting smart HTTP.\n...\n>\n> And here's a snip from my access_log:\n>\n>     ::1 - - [29/Jul/2012:18:34:34 +0100] \"GET\n> /repo/myproject.git/info/refs?service=git-receive-pack HTTP/1.1\" 200 117\n\nWas this request actually served using the smart http-backend? Try the\nrequest yourself on the command line with curl, making sure to pass\nthe ?service=git-receive-pack query parameter. A smart HTTP response\nwill include a service=git-receive-pack line as the first line of the\nresponse body. I don't think Apache called the http-backend CGI, and\nso the client thought the server was not smart HTTP capable.\n"},{"id":"196112","messageId":"1343637600904-7564056.post@n2.nabble.com","threadId":"31131","inReplyTo":"CAJo=hJtB6OQ8+8Q_JgPoAntOdQ=Z0tOERYRD7wJ0LRLgacYA8A@mail.gmail.com","subject":"Re: PROPFIND 405 with git-http-backend and Smart HTTP","fromName":"Bo98","fromEmail":"boellisanderson@aol.com","sentAt":"2012-07-30T08:40:00Z","receivedAt":"2012-07-30T08:40:00Z","isPatch":false,"sender":{"key":"boellisanderson@aol.com","avatar":null},"body":"\nShawn Pearce wrote\n> \n>> And here's a snip from my access_log:\n>>\n>>     ::1 - - [29/Jul/2012:18:34:34 +0100] \"GET\n>> /repo/myproject.git/info/refs?service=git-receive-pack HTTP/1.1\" 200 117\n> \n> Was this request actually served using the smart http-backend? Try the\n> request yourself on the command line with curl, making sure to pass\n> the ?service=git-receive-pack query parameter. A smart HTTP response\n> will include a service=git-receive-pack line as the first line of the\n> response body. I don't think Apache called the http-backend CGI, and\n> so the client thought the server was not smart HTTP capable.\n> \n\nThis is what curl returned:\n\n2ddf56592a0f55456b8c42dc9f2cb9289f083f53\trefs/heads/1.0.x\n55079bb13d9af8a9164ad0d24b654cbfe119bc7e\trefs/heads/master\n\nLooks okay. Those are the 2 branches I've got.\n\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/PROPFIND-405-with-git-http-backend-and-Smart-HTTP-tp7564017p7564056.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"196155","messageId":"CAJo=hJtynNo3SPmM4vmmsS3b7PTUwOcQpHPYh0_sPWFWL-4HMA@mail.gmail.com","threadId":"31131","inReplyTo":"1343637600904-7564056.post@n2.nabble.com","subject":"Re: PROPFIND 405 with git-http-backend and Smart HTTP","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2012-07-30T16:37:46Z","receivedAt":"2012-07-30T16:37:46Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"On Mon, Jul 30, 2012 at 1:40 AM, Bo98 <BoEllisAnderson@aol.com> wrote:\n>\n> Shawn Pearce wrote\n>>\n>>> And here's a snip from my access_log:\n>>>\n>>>     ::1 - - [29/Jul/2012:18:34:34 +0100] \"GET\n>>> /repo/myproject.git/info/refs?service=git-receive-pack HTTP/1.1\" 200 117\n>>\n>> Was this request actually served using the smart http-backend? Try the\n>> request yourself on the command line with curl, making sure to pass\n>> the ?service=git-receive-pack query parameter. A smart HTTP response\n>> will include a service=git-receive-pack line as the first line of the\n>> response body. I don't think Apache called the http-backend CGI, and\n>> so the client thought the server was not smart HTTP capable.\n>>\n>\n> This is what curl returned:\n>\n> 2ddf56592a0f55456b8c42dc9f2cb9289f083f53        refs/heads/1.0.x\n> 55079bb13d9af8a9164ad0d24b654cbfe119bc7e        refs/heads/master\n>\n> Looks okay. Those are the 2 branches I've got.\n\nNo, a smart HTTP response looks more like this:\n\n1e# service=git-receive-pack\n000000a5e7a3bcbbb8083e812ce07a5459f0e6d30edfb9fe HEAD include-tag\nmulti_ack_detailed multi_ack ofs-delta side-band side-band-64k\nthin-pack no-progress shallow no-done\n\nLooks like Apache isn't calling the smart-http CGI.\n"},{"id":"196191","messageId":"1343680215071-7564137.post@n2.nabble.com","threadId":"31131","inReplyTo":"CAJo=hJtynNo3SPmM4vmmsS3b7PTUwOcQpHPYh0_sPWFWL-4HMA@mail.gmail.com","subject":"Re: PROPFIND 405 with git-http-backend and Smart HTTP","fromName":"Bo98","fromEmail":"boellisanderson@aol.com","sentAt":"2012-07-30T20:30:15Z","receivedAt":"2012-07-30T20:30:15Z","isPatch":false,"sender":{"key":"boellisanderson@aol.com","avatar":null},"body":"\nShawn Pearce wrote\n> \n> No, a smart HTTP response looks more like this:\n> \n> 1e# service=git-receive-pack\n> 000000a5e7a3bcbbb8083e812ce07a5459f0e6d30edfb9fe HEAD include-tag\n> multi_ack_detailed multi_ack ofs-delta side-band side-band-64k\n> thin-pack no-progress shallow no-done\n> \n> Looks like Apache isn't calling the smart-http CGI.\n> \n\nOh ok, thanks! But do you have any idea why? Everything in my config looks\nokay to me. I've got my GIT_PROJECT_ROOT, my GIT_HTTP_EXPORT_ALL, my\nScriptAlias and my LocationMatch. I'm not sure why it's like this.\n\n\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/PROPFIND-405-with-git-http-backend-and-Smart-HTTP-tp7564017p7564137.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"196193","messageId":"CAJo=hJsES44mXWjKmFqe7z+T_FHZ6Pi19toURyVp-wvW8AqQiw@mail.gmail.com","threadId":"31131","inReplyTo":"1343680215071-7564137.post@n2.nabble.com","subject":"Re: PROPFIND 405 with git-http-backend and Smart HTTP","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2012-07-30T20:42:25Z","receivedAt":"2012-07-30T20:42:25Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"On Mon, Jul 30, 2012 at 1:30 PM, Bo98 <BoEllisAnderson@aol.com> wrote:\n>\n> Shawn Pearce wrote\n>>\n>> No, a smart HTTP response looks more like this:\n>>\n>> 1e# service=git-receive-pack\n>> 000000a5e7a3bcbbb8083e812ce07a5459f0e6d30edfb9fe HEAD include-tag\n>> multi_ack_detailed multi_ack ofs-delta side-band side-band-64k\n>> thin-pack no-progress shallow no-done\n>>\n>> Looks like Apache isn't calling the smart-http CGI.\n>>\n>\n> Oh ok, thanks! But do you have any idea why? Everything in my config looks\n> okay to me. I've got my GIT_PROJECT_ROOT, my GIT_HTTP_EXPORT_ALL, my\n> ScriptAlias and my LocationMatch. I'm not sure why it's like this.\n\nMaybe you forgot to enable ExecCGI?\n"},{"id":"196198","messageId":"1343684368384-7564144.post@n2.nabble.com","threadId":"31131","inReplyTo":"CAJo=hJsES44mXWjKmFqe7z+T_FHZ6Pi19toURyVp-wvW8AqQiw@mail.gmail.com","subject":"Re: PROPFIND 405 with git-http-backend and Smart HTTP","fromName":"Bo98","fromEmail":"boellisanderson@aol.com","sentAt":"2012-07-30T21:39:28Z","receivedAt":"2012-07-30T21:39:28Z","isPatch":false,"sender":{"key":"boellisanderson@aol.com","avatar":null},"body":"\nShawn Pearce wrote\n> \n> Maybe you forgot to enable ExecCGI?\n> \n\nWhoops, completely forgot about that, but, assuming I did it right, it still\ndoesn't seem to work.\n\nHere's what I did:\n\n  <Directory \"/usr/libexec/git-core/\">\n    Options +ExecCGI\n    Allow From All\n  </Directory>\n\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/PROPFIND-405-with-git-http-backend-and-Smart-HTTP-tp7564017p7564144.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"196489","messageId":"CAM9Z-nnfwuR9UKtoQ1uACOMH3vhZKFxDkjEn5_azpGxd2GGjJQ@mail.gmail.com","threadId":"31131","inReplyTo":"1343684368384-7564144.post@n2.nabble.com","subject":"Re: PROPFIND 405 with git-http-backend and Smart HTTP","fromName":"Drew Northup","fromEmail":"n1xim.email@gmail.com","sentAt":"2012-08-05T18:30:51Z","receivedAt":"2012-08-05T18:30:51Z","isPatch":false,"sender":{"key":"n1xim.email@gmail.com","avatar":null},"body":"On Mon, Jul 30, 2012 at 5:39 PM, Bo98 <BoEllisAnderson@aol.com> wrote:\n>\n> Shawn Pearce wrote\n>> Maybe you forgot to enable ExecCGI?\n>>\n> Whoops, completely forgot about that, but, assuming I did it right, it still\n> doesn't seem to work.\n>\n> Here's what I did:\n>\n>   <Directory \"/usr/libexec/git-core/\">\n>     Options +ExecCGI\n>     Allow From All\n>   </Directory>\n\nAre all directory permissions set right? Is SELINUX enabled, and if so\nare all of the contexts set correctly? Does your Apache configuration\nrecognize things NOT spelled *.cgi as CGI scripts / programs?\n\nBesides, once you start asking Apache to do things outside of the base\nDocument Root all sorts of interesting possibilities for failure\nbecome available.\n\nI am pretty sure that this isn't a Git problem, it is a CGI hosting /\nconfiguration problem. An Apache-centric list may be able to help you\nbetter and is likely a better place to ask.\n\n-- \n-Drew Northup\n--------------------------------------------------------------\n\"As opposed to vegetable or mineral error?\"\n-John Pescatore, SANS NewsBites Vol. 12 Num. 59\n"},{"id":"247715","messageId":"1408011794311-7616843.post@n2.nabble.com","threadId":"31131","inReplyTo":"CAM9Z-nnfwuR9UKtoQ1uACOMH3vhZKFxDkjEn5_azpGxd2GGjJQ@mail.gmail.com","subject":"Re: PROPFIND 405 with git-http-backend and Smart HTTP","fromName":"lpicquet","fromEmail":"lpicquet@gmail.com","sentAt":"2014-08-14T10:23:14Z","receivedAt":"2014-08-14T10:23:14Z","isPatch":false,"sender":{"key":"lpicquet@gmail.com","avatar":null},"body":"You need to allow the directory to be read?\n\t<directory Path/to/your/repositories>\n  \t\tAllow from all\n\t</directory>\n\n\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/PROPFIND-405-with-git-http-backend-and-Smart-HTTP-tp7564017p7616843.html\nSent from the git mailing list archive at Nabble.com.\n"}]}