{"thread":{"id":"27750","subject":"Re: push problem with anonymous access","startedAt":"2011-07-04T07:13:10Z","lastAt":"2011-07-04T10:02:24Z","messageCount":2,"participants":["Michele Marcionelli"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"170810","messageId":"FCA17A33-EC1F-4649-9047-D8D56BE11D46@math.ethz.ch","threadId":"27750","inReplyTo":null,"subject":"Re: push problem with anonymous access","fromName":"Michele Marcionelli","fromEmail":"michele.marcionelli@math.ethz.ch","sentAt":"2011-07-04T07:13:10Z","receivedAt":"2011-07-04T07:13:10Z","isPatch":false,"sender":{"key":"michele.marcionelli@math.ethz.ch","avatar":null},"body":"Hi Ray\n\nI tried as you suggested (even if to clone I don't need a password):\n\n$ git clone https://michele:******@git.math.ethz.ch/git/math/public_test.git\n==>\nCloning into public_test...\nremote: Counting objects: 15, done.\nremote: Compressing objects: 100% (7/7), done.\nremote: Total 15 (delta 0), reused 0 (delta 0)\nUnpacking objects: 100% (15/15), done.\n\nAnd in the apache logs:\n129.132.147.190 - - [04/Jul/2011:08:14:40 +0200] \"GET /git/math/public_test.git/info/refs?service=git-upload-pack HTTP/1.1\" 200 264 \"-\" \"git/1.7.5.4\"\n129.132.147.190 - - [04/Jul/2011:08:14:40 +0200] \"POST /git/math/public_test.git/git-upload-pack HTTP/1.1\" 200 1688 \"-\" \"git/1.7.5.4\"\n\nBut the when I push (and here is my problem):\n$ cd public_test\n$ echo foo >> TODO\n$ git commit TODO -m bar\n$ git push\n==>\nerror: Cannot access URL https://michele:******@git.math.ethz.ch/git/math/public_test.git/, return code 22\nfatal: git-http-push failed\n\nI get following in the apache logs:\n\n==> /var/log/httpd/git-ssl.access_log <==\n129.132.147.190 - - [04/Jul/2011:08:17:45 +0200] \"GET /git/math/public_test.git/info/refs?service=git-receive-pack HTTP/1.1\" 403 - \"-\" \"git/1.7.5.4\"\n129.132.147.190 - - [04/Jul/2011:08:17:45 +0200] \"GET /git/math/public_test.git/info/refs HTTP/1.1\" 200 59 \"-\" \"git/1.7.5.4\"\n==> /var/log/httpd/git-ssl.error_log <==\n[Mon Jul 04 08:17:45 2011] [error] [client 129.132.147.190] Service not enabled: 'receive-pack'\n==> /var/log/httpd/git-ssl.access_log <==\n129.132.147.190 - - [04/Jul/2011:08:17:45 +0200] \"GET /git/math/public_test.git/HEAD HTTP/1.1\" 200 23 \"-\" \"git/1.7.5.4\"\n129.132.147.190 - - [04/Jul/2011:08:17:46 +0200] \"PROPFIND /git/math/public_test.git/ HTTP/1.1\" 404 - \"-\" \"git/1.7.5.4\"\n==> /var/log/httpd/git-ssl.error_log <==\n[Mon Jul 04 08:17:46 2011] [error] [client 129.132.147.190] Request not supported: '/var/www/vhosts/git/root/math/public_test.git/'\n\n\nThe problem that I see is that in the configuration (see also the \"man git-http-backend\") you have this\n\n    <LocationMatch \"^/git/.*/git-receive-pack$\">\n\nand \"git push\" do following request:\n\n    /git/whatever/info/refs?service=git-receive-pack\n\nwhich is not matched by the \"LocationMarch\".\n\nThx, Michele\n\nPS: I'm not using WebDAV, since it is not documented in the man page.\n\n\nOn Jul 2, 2011, at 17:19 , Tay Ray Chuan wrote:\n\n> On Sat, Jul 2, 2011 at 6:32 AM, Michele Marcionelli\n> <michele.marcionelli <at> math.ethz.ch> wrote:\n>> ==> /var/log/httpd/git-ssl.access_log <==\n>> 85.1.201.213 - - [02/Jul/2011:00:13:32 +0200] \"GET\n> /git/math/public_test.git/info/refs?service=git-receive-pack HTTP/1.1\" 403 - \"-\" \"git/1.7.5.4\"\n> \n> Try\n> \n>  $ git clone https://<user>:<pwd>@git.math.ethz.ch/git/math/public_test.git\n> \n> or put it in ~/.netrc.\n> \n> -- \n> Cheers,\n> Ray Chuan\n\n--\nMichele Marcionelli · mm@ethz.ch · +41 44 632 6193\n* Please consider the environment before printing\n"},{"id":"170811","messageId":"27A41224-5E1E-4F32-8369-438E48432E60@math.ethz.ch","threadId":"27750","inReplyTo":"FCA17A33-EC1F-4649-9047-D8D56BE11D46@math.ethz.ch","subject":"Re: push problem with anonymous access","fromName":"Michele Marcionelli","fromEmail":"michele.marcionelli@math.ethz.ch","sentAt":"2011-07-04T10:02:24Z","receivedAt":"2011-07-04T10:02:24Z","isPatch":false,"sender":{"key":"michele.marcionelli@math.ethz.ch","avatar":null},"body":"I found out something: with these 2 lines in \"public_test.git/config\":\n\n[http]\n    receivepack = true\n\nNow I can push and the log files looks like this:\n==> /var/log/httpd/git-ssl.access_log <==\n129.132.147.190 - - [04/Jul/2011:11:26:57 +0200] \"GET /git/math/public_test.git/info/refs?service=git-receive-pack HTTP/1.1\" 200 153 \"-\" \"git/1.7.5.4\"\n129.132.147.190 - - [04/Jul/2011:11:26:57 +0200] \"POST /git/math/public_test.git/git-receive-pack HTTP/1.1\" 406 - \"-\" \"git/1.7.5.4\"\n129.132.147.190 - michele [04/Jul/2011:11:26:57 +0200] \"POST /git/math/public_test.git/git-receive-pack HTTP/1.1\" 200 52 \"-\" \"git/1.7.5.4\"\n==> /var/log/httpd/git-ssl.error_log <==\n[Mon Jul 04 11:26:57 2011] [error] [client 129.132.147.190] no acceptable variant: /var/www/error/HTTP_UNAUTHORIZED.html.var\n\nSo 2 questions:\n1) it is ok to set \"receivepack = true\"? It's not dangerous?\n2) I still get an error 406 (see second line)... is that normal?\n3) shouldn't somebody include this information in some official FAQ or in the man page of git-http-backend?\n\nRegards,\nMichele\n\n\nOn Jul 4, 2011, at 9:13 , Michele Marcionelli wrote:\n\n> Hi Ray\n> \n> I tried as you suggested (even if to clone I don't need a password):\n> \n> $ git clone https://michele:******@git.math.ethz.ch/git/math/public_test.git\n> ==>\n> Cloning into public_test...\n> remote: Counting objects: 15, done.\n> remote: Compressing objects: 100% (7/7), done.\n> remote: Total 15 (delta 0), reused 0 (delta 0)\n> Unpacking objects: 100% (15/15), done.\n> \n> And in the apache logs:\n> 129.132.147.190 - - [04/Jul/2011:08:14:40 +0200] \"GET /git/math/public_test.git/info/refs?service=git-upload-pack HTTP/1.1\" 200 264 \"-\" \"git/1.7.5.4\"\n> 129.132.147.190 - - [04/Jul/2011:08:14:40 +0200] \"POST /git/math/public_test.git/git-upload-pack HTTP/1.1\" 200 1688 \"-\" \"git/1.7.5.4\"\n> \n> But the when I push (and here is my problem):\n> $ cd public_test\n> $ echo foo >> TODO\n> $ git commit TODO -m bar\n> $ git push\n> ==>\n> error: Cannot access URL https://michele:******@git.math.ethz.ch/git/math/public_test.git/, return code 22\n> fatal: git-http-push failed\n> \n> I get following in the apache logs:\n> \n> ==> /var/log/httpd/git-ssl.access_log <==\n> 129.132.147.190 - - [04/Jul/2011:08:17:45 +0200] \"GET /git/math/public_test.git/info/refs?service=git-receive-pack HTTP/1.1\" 403 - \"-\" \"git/1.7.5.4\"\n> 129.132.147.190 - - [04/Jul/2011:08:17:45 +0200] \"GET /git/math/public_test.git/info/refs HTTP/1.1\" 200 59 \"-\" \"git/1.7.5.4\"\n> ==> /var/log/httpd/git-ssl.error_log <==\n> [Mon Jul 04 08:17:45 2011] [error] [client 129.132.147.190] Service not enabled: 'receive-pack'\n> ==> /var/log/httpd/git-ssl.access_log <==\n> 129.132.147.190 - - [04/Jul/2011:08:17:45 +0200] \"GET /git/math/public_test.git/HEAD HTTP/1.1\" 200 23 \"-\" \"git/1.7.5.4\"\n> 129.132.147.190 - - [04/Jul/2011:08:17:46 +0200] \"PROPFIND /git/math/public_test.git/ HTTP/1.1\" 404 - \"-\" \"git/1.7.5.4\"\n> ==> /var/log/httpd/git-ssl.error_log <==\n> [Mon Jul 04 08:17:46 2011] [error] [client 129.132.147.190] Request not supported: '/var/www/vhosts/git/root/math/public_test.git/'\n> \n> \n> The problem that I see is that in the configuration (see also the \"man git-http-backend\") you have this\n> \n>    <LocationMatch \"^/git/.*/git-receive-pack$\">\n> \n> and \"git push\" do following request:\n> \n>    /git/whatever/info/refs?service=git-receive-pack\n> \n> which is not matched by the \"LocationMarch\".\n> \n> Thx, Michele\n> \n> PS: I'm not using WebDAV, since it is not documented in the man page.\n> \n> \n> On Jul 2, 2011, at 17:19 , Tay Ray Chuan wrote:\n> \n>> On Sat, Jul 2, 2011 at 6:32 AM, Michele Marcionelli\n>> <michele.marcionelli <at> math.ethz.ch> wrote:\n>>> ==> /var/log/httpd/git-ssl.access_log <==\n>>> 85.1.201.213 - - [02/Jul/2011:00:13:32 +0200] \"GET\n>> /git/math/public_test.git/info/refs?service=git-receive-pack HTTP/1.1\" 403 - \"-\" \"git/1.7.5.4\"\n>> \n>> Try\n>> \n>> $ git clone https://<user>:<pwd>@git.math.ethz.ch/git/math/public_test.git\n>> \n>> or put it in ~/.netrc.\n>> \n>> -- \n>> Cheers,\n>> Ray Chuan\n> \n> --\n> Michele Marcionelli · mm@ethz.ch · +41 44 632 6193\n> * Please consider the environment before printing\n> \n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n--\nMichele Marcionelli · mm@ethz.ch · +41 44 632 6193\n* Please consider the environment before printing\n"}]}