This has been driving me nuts. I'm running git 1.7.8.rc4 with Apache/2.2.14 on Lucid Ubuntu, and set up LDAP authentication. The authentication seems to be working fine, and i can pull, but i can't push without getting a 403 error.

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

My apache site file:

SetEnv GIT_PROJECT_ROOT /opt/git

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 "/opt/tools">
  AllowOverride None
  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
  Order allow,deny
  Allow from all

<LocationMatch "^/git/.*/git-receive-pack$">
        Order deny,allow
        Deny from all
        AuthName "GIT Repo"
        AuthType Basic
        AuthBasicProvider ldap
        AuthzLDAPAuthoritative off
        AuthLDAPURL "ldap://,dc=com"
        Require valid-user

Everything i find regarding "client denied by server configuration" says "Add 'Order allow,deny / Allow from all' to the correct Directory entry." It's there, and it's still not working. Any ideas? I know i'm really close and is probably something super simple.


Solved. The issue was in the LocationMatch block:

Order deny,allow
Deny from all

was causing the 403 error. Change it to be permissive as in the Directory block and it changes to a 401, which turned out to be a problem with the LDAP authentication. I changed the AuthBasicProvider to 'external' and used pwauth as per (pyxzl.net/store/authnz.php)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.