git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michele Marcionelli <michele.marcionelli@math.ethz.ch>
To: <git@vger.kernel.org>
Subject: push problem with anonymous access
Date: Sat, 2 Jul 2011 00:32:48 +0200	[thread overview]
Message-ID: <9490CEEB-485B-4EC0-B75B-8ED8F0833712@math.ethz.ch> (raw)

Dear all

I configured apache as described on the man page:

SetEnv GIT_PROJECT_ROOT /var/www/vhosts/git/root
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ /scratch/local/app/git/current/libexec/git-core/git-http-backend/

And then the following 2 repositories (also as described in the page):

# (1) authentication for both reads and writes
<LocationMatch /git/math/private_test.git>
   AuthType Basic
   AuthName "Git Access"
   Require user admin
   AuthUserFile /var/www/vhosts/git/htpasswd
</LocationMatch>

# (2) anonymous read access but authenticated write access
<LocationMatch "/git/math/public_test.git/git-receive-pack$">
   AuthType Basic
   AuthName "Git Access"
   Require user admin
   AuthUserFile /var/www/vhosts/git/htpasswd
</LocationMatch>

Now: 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:

export GIT_SSL_NO_VERIFY=true
git clone https://git.math.ethz.ch/git/math/public_test.git
cd public_test
echo foo >> TODO
git commit TODO -m bar
git push

I get followin errors to "stderr":
error: Cannot access URL https://git.math.ethz.ch/git/math/public_test.git/, return code 22
fatal: git-http-push failed

An to the apache access_log & error_log files:
==> /var/log/httpd/git-ssl.access_log <==
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"
85.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"
85.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"
85.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"
==> /var/log/httpd/git-ssl.error_log <==
[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/'

Any Idea?

Thx, Michele


--
Michele Marcionelli · mm@ethz.ch · +41 44 632 6193
* Please consider the environment before printing

             reply	other threads:[~2011-07-01 22:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-01 22:32 Michele Marcionelli [this message]
2011-07-02 15:19 ` push problem with anonymous access Tay Ray Chuan
  -- strict thread matches above, loose matches on Subject: below --
2011-07-04  7:13 Michele Marcionelli
2011-07-04 10:02 ` Michele Marcionelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9490CEEB-485B-4EC0-B75B-8ED8F0833712@math.ethz.ch \
    --to=michele.marcionelli@math.ethz.ch \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).