2

I'm currently trying to setup a git repository to be accessed via http through an apache 2.4 .

For reasons I can't grasp, my client will always respond a cloning or pushing attempt with

*URL*/git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

I've stripped down the configuration to an absolute minimum, even got rid of Aliasmatches:

<VirtualHost *:80>
Options +FollowSymlinks
SetEnv GIT_PROJECT_ROOT /opt/git/nocturne/
SetEnv GIT_HTTP_EXPORT_ALL=true
ScriptAlias /git/ /usr/lib/git-core/git-http-backend/
<Location "/git">
       Options +ExecCGI
       AuthName "Git repository, use ldap credentials"
       AuthLDAPURL "ldap://127.0.0.1:389/ou=People,dc=domain,dc=stuff?uid?sub?(objectClass=simpleSecurityObject)"
       AuthType Basic
       AuthName "Git"
       AuthBasicProvider ldap
       AuthLDAPGroupAttribute member
       AuthLDAPGroupAttributeIsDN Off
       require valid-user
       require ldap-group cn=git-user,ou=Groups,dc=domain,dc=stuff
</Location>
</VirtualHost>

The repository itself has been init using git init --bare and is symlinked into /var/www/git .

I'm asking you to tell me, what obvious stuff I'm missing. I ran git-update-server-info already, and the repository is readable and writable by the www user.

Thank you in advance

  • dumb httlp? This isn't dumb, this is smart http: http://stackoverflow.com/a/5265022/6309. As in http://stackoverflow.com/a/24167097/6309 – VonC Aug 09 '14 at 12:32
  • thanks for pointing out my misunderstandig. I've corrected the question. – user3924819 Aug 09 '14 at 16:35
  • Did you checkout the example at http://stackoverflow.com/a/3982493/6309? Did you setenv the REMOTE_USER as in http://stackoverflow.com/a/24217525/6309? Did you try `Directory` instead of `Location`? (as in https://github.com/VonC/compileEverything/blob/c1ec1e4bb4dedea93bc251d8395c9c7627c08440/apache/env.conf.tpl#L105) – VonC Aug 09 '14 at 18:00

1 Answers1

0

I noticed the line "SetEnv GIT_HTTP_EXPORT_ALL=true" in your configuration file should not have an equal sign ("="). That equal sign may be causing Apache to set the wrong environment variable name.

Shane Hathaway
  • 2,141
  • 1
  • 13
  • 9