On Tue, 12 May 2015 00:40:13 -0700 (PDT) Matthias Lantsch <alasar.gogle.su...@gmail.com> wrote:
> I usually always try to solve problems myself, but I really have > gotten onto my limits with this. > Situation: > I am trying to create a php "glue" script between apache and the git > http backend in order to allow myself to hook into all git processes > via my php framework [...] > To make sure that the problem lies not with the server setup, I have > executed tests on 2 different linux machines as well as a windows > machine. I was testing with a bare repository, which I added a single > file to over local push (file://). > GIt update-server-info was executed as well. > But I always get the message: > warning: You appear to have cloned an empty repository. > Checking connectivity... done. > And in my apache error log: > fatal: 'test.git/info/refs': aliased\n [...] I reckon this might be the root of your problem. Can you start with plain apache setup which works, and then transition to your solution? To be more clear, the basic idea of setting up Apache to be a front-end to Git is somehow make sure that some common prefix on your designated virtual host (or the default host, if applies) is defined to be a script alias to the git-http-backend binary. That is, something like: <VirtualHost *:80> ServerName git.domain.local ServerAlias git DocumentRoot /srv/git ScriptAlias / /usr/lib/git-core/git-http-backend/ # Access control directives etc... # Maybe also SetEnv GIT_PROJECT_ROOT /srv/git </VirtualHost> Once you have this working, replace the real git-http-backend with your custom wrapper and have it done. The git-http-backend manual page contains extensive examples, including a way to make Apache serve certain static files directly (using sendfile(2) on Linux and whatnot) rather than through the backend. To recap, I'd work piecemeal: first get Git http backend working along with your front-end and only then plug your PHP framework in place of the backend, wrapping it. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.