git推迟智能HTTP失败与403

这一直让我疯狂。 我在Lucid Ubuntu上用Apache / 2.2.14运行git 1.7.8.rc4,并设置了LDAPauthentication。 身份validation似乎工作正常,我可以拉,但我不能推动没有得到一个403错误。

[Fri Dec 16 20:04:25 2011] [error] [client 10.60.226.130] client denied by server configuration: /opt/tools/libexec/git-core/git-http-backend 

我的apache站点文件:

 SetEnv GIT_PROJECT_ROOT /opt/git SetEnv GIT_HTTP_EXPORT_ALL SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER ScriptAlias /git/ /opt/tools/libexec/git-core/git-http-backend/ <Directory "/opt/git"> Options -Indexes FollowSymLinks AllowOverride AuthConfig FileInfo Order allow,deny Allow from all </Directory> <Directory "/opt/tools"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> <LocationMatch "^/git/.*/git-receive-pack$"> Order deny,allow Deny from all AuthName "GIT Repo" AuthType Basic AuthBasicProvider ldap AuthzLDAPAuthoritative off AuthLDAPURL "ldap://10.59.10.40:389/dc=shopping,dc=com" Require valid-user </LocationMatch> 

我发现有关“客户端被服务器configuration拒绝”的所有内容都说:“添加命令允许,拒绝/允许所有'到正确的目录条目。 它在那里,而且还没有工作。 有任何想法吗? 我知道我真的很接近,可能是超级简单的东西。

解决了。 问题出在了LocationMatch块:

 Order deny,allow Deny from all 

导致了403错误。 将其更改为宽容,如在目录块中,它将更改为401,这是LDAP身份validation的问题。 我将AuthBasicProvider更改为“external”,并使用pwauth( pyxzl.net/store/authnz.php )