{"thread":{"id":"27742","subject":"push problem with anonymous access","startedAt":"2011-07-01T22:32:48Z","lastAt":"2011-07-02T15:19:36Z","messageCount":2,"participants":["Michele Marcionelli","Tay Ray Chuan"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"170758","messageId":"9490CEEB-485B-4EC0-B75B-8ED8F0833712@math.ethz.ch","threadId":"27742","inReplyTo":null,"subject":"push problem with anonymous access","fromName":"Michele Marcionelli","fromEmail":"michele.marcionelli@math.ethz.ch","sentAt":"2011-07-01T22:32:48Z","receivedAt":"2011-07-01T22:32:48Z","isPatch":false,"sender":{"key":"michele.marcionelli@math.ethz.ch","avatar":null},"body":"Dear all\n\nI configured apache as described on the man page:\n\nSetEnv GIT_PROJECT_ROOT /var/www/vhosts/git/root\nSetEnv GIT_HTTP_EXPORT_ALL\nScriptAlias /git/ /scratch/local/app/git/current/libexec/git-core/git-http-backend/\n\nAnd then the following 2 repositories (also as described in the page):\n\n# (1) authentication for both reads and writes\n<LocationMatch /git/math/private_test.git>\n   AuthType Basic\n   AuthName \"Git Access\"\n   Require user admin\n   AuthUserFile /var/www/vhosts/git/htpasswd\n</LocationMatch>\n\n# (2) anonymous read access but authenticated write access\n<LocationMatch \"/git/math/public_test.git/git-receive-pack$\">\n   AuthType Basic\n   AuthName \"Git Access\"\n   Require user admin\n   AuthUserFile /var/www/vhosts/git/htpasswd\n</LocationMatch>\n\nNow: with the repository (1) I can do everything, clone & push. With the repository (2) I can only clone and when I try to push as follow:\n\nexport GIT_SSL_NO_VERIFY=true\ngit clone https://git.math.ethz.ch/git/math/public_test.git\ncd public_test\necho foo >> TODO\ngit commit TODO -m bar\ngit push\n\nI get followin errors to \"stderr\":\nerror: Cannot access URL https://git.math.ethz.ch/git/math/public_test.git/, return code 22\nfatal: git-http-push failed\n\nAn to the apache access_log & error_log files:\n==> /var/log/httpd/git-ssl.access_log <==\n85.1.201.213 - - [02/Jul/2011:00:13:32 +0200] \"GET /git/math/public_test.git/info/refs?service=git-receive-pack HTTP/1.1\" 403 - \"-\" \"git/1.7.5.4\"\n85.1.201.213 - - [02/Jul/2011:00:13:33 +0200] \"GET /git/math/public_test.git/info/refs HTTP/1.1\" 200 59 \"-\" \"git/1.7.5.4\"\n85.1.201.213 - - [02/Jul/2011:00:13:33 +0200] \"GET /git/math/public_test.git/HEAD HTTP/1.1\" 200 23 \"-\" \"git/1.7.5.4\"\n85.1.201.213 - - [02/Jul/2011:00:13:33 +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[Sat Jul 02 00:13:33 2011] [error] [client 85.1.201.213] Request not supported: '/var/www/vhosts/git/root/math/public_test.git/'\n\nAny Idea?\n\nThx, Michele\n\n\n--\nMichele Marcionelli · mm@ethz.ch · +41 44 632 6193\n* Please consider the environment before printing\n"},{"id":"170779","messageId":"CALUzUxpXFb_zPw0uBXdeGk2rAWMJ+K1518EO16rjFc3kCpkU5Q@mail.gmail.com","threadId":"27742","inReplyTo":"9490CEEB-485B-4EC0-B75B-8ED8F0833712@math.ethz.ch","subject":"Re: push problem with anonymous access","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2011-07-02T15:19:36Z","receivedAt":"2011-07-02T15:19:36Z","isPatch":false,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"On Sat, Jul 2, 2011 at 6:32 AM, Michele Marcionelli\n<michele.marcionelli@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 /git/math/public_test.git/info/refs?service=git-receive-pack HTTP/1.1\" 403 - \"-\" \"git/1.7.5.4\"\n\nTry\n\n  $ git clone https://<user>:<pwd>@git.math.ethz.ch/git/math/public_test.git\n\nor put it in ~/.netrc.\n\n-- \nCheers,\nRay Chuan\n"}]}