*Hello Git Community,*
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
(So auth and automatic building and version number handling can be handled 
from my php git web frontend).
But I cannot seem to get it to work. The official git http backend 
documentation <http://git-scm.com/docs/git-http-backend> states this:
To determine the location of the repository on disk, *git http-backend*
concatenates the environment variables PATH_INFO, which is set
automatically by the web server, and GIT_PROJECT_ROOT, which must be set
manually in the web server configuration.  If GIT_PROJECT_ROOT is not
set, *git http-backend* reads PATH_TRANSLATED, which is also set
automatically by the web server.
It also goes on about what environment variables the web server has to set 
in order for it to work

PATH_INFO (if GIT_PROJECT_ROOT is set, otherwise PATH_TRANSLATED)

   - 
   
   REMOTE_USER
   - 
   
   REMOTE_ADDR
   - 
   
   CONTENT_TYPE
   - 
   
   QUERY_STRING
   - 
   
   REQUEST_METHOD
   
Which I am doing as I should:
     define('GIT_PROJECT_ROOT', '/var/www/html/gittest/');
     define('GIT_DOCUMENT_ROOT', '/gittest/');

     define('GIT_HTTP_BACKEND', '/usr/lib/git-core/git-http-backend');

    $env = array (
        "GIT_PROJECT_ROOT" => GIT_PROJECT_ROOT,
        "GIT_HTTP_EXPORT_ALL" => "1",
        "REMOTE_USER" => isset($_SERVER["REMOTE_USER"]) ? $_SERVER[
"REMOTE_USER"] : "REMOTE_USER",
        "REMOTE_ADDR" => isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER[
"REMOTE_ADDR"] : "",
        "REQUEST_METHOD" => isset($_SERVER["REQUEST_METHOD"]) ? $_SERVER[
"REQUEST_METHOD"] : "",
        "PATH_INFO" => $pth,
        "QUERY_STRING" => isset($_SERVER["QUERY_STRING"]) ? $_SERVER[
"QUERY_STRING"] : "",
        "CONTENT_TYPE" => isset($request_headers["Content-Type"]) ? 
$request_headers["Content-Type"] : "",
    );

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
Googling this very generic and useless (thanks git :)) error message did 
not fruition in any solution to be found.
I am that desperate I was just looking at the git source code in order to 
try if I could see something that was not well documented in the official 
documentation.

Sorry for the long post, but the Problem has to be described well :)
Thanks in advance for your help.



-- 
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.

Reply via email to