Re: [git-users] Re: Trouble with the git-http-backend; Documentation unprecise

2015-05-25 Thread Matthias Lantsch
Of course, that was stupid of me :D
Nevertheless, I followed your advice and it does seem to almost work now, 
even though the new Problem does not have anything to do with the 
communication between all those scripts, that's working fine now.
Thanks for all of your help guys.

Am Mittwoch, 13. Mai 2015 13:28:48 UTC+2 schrieb Konstantin Khomoutov:

 On Tue, 12 May 2015 00:43:14 -0700 (PDT) 
 Matthias Lantsch alasar.go...@gmail.com javascript: wrote: 

  I'm sorry I forgot about the most important part: 
  setting the pth variable for the PATH_INFO 
  $pth = explode(GIT_DOCUMENT_ROOT, isset($_SERVER 
  ['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : '', 2); 
  $pth = array_pop($pth); 

 One problem with the way you're communicating your difficulties with us 
 is that you imply everyone is fluent in PHP, which is just wrong ;-) 


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


Re: [git-users] Re: Trouble with the git-http-backend; Documentation unprecise

2015-05-13 Thread Konstantin Khomoutov
On Tue, 12 May 2015 00:43:14 -0700 (PDT)
Matthias Lantsch alasar.gogle.su...@gmail.com wrote:

 I'm sorry I forgot about the most important part:
 setting the pth variable for the PATH_INFO
 $pth = explode(GIT_DOCUMENT_ROOT, isset($_SERVER
 ['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : '', 2);
 $pth = array_pop($pth);

One problem with the way you're communicating your difficulties with us
is that you imply everyone is fluent in PHP, which is just wrong ;-)

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


[git-users] Re: Trouble with the git-http-backend; Documentation unprecise

2015-05-12 Thread Matthias Lantsch
I'm sorry I forgot about the most important part:
setting the pth variable for the PATH_INFO
$pth = explode(GIT_DOCUMENT_ROOT, isset($_SERVER['REDIRECT_URL']) ? 
$_SERVER['REDIRECT_URL'] : '', 2);
$pth = array_pop($pth);



Am Dienstag, 12. Mai 2015 09:40:13 UTC+2 schrieb Matthias Lantsch:

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


[git-users] Re: Trouble with the git-http-backend; Documentation unprecise

2015-05-12 Thread Thomas Ferris Nicolaisen


On Tuesday, May 12, 2015 at 9:40:13 AM UTC+2, Matthias Lantsch wrote:

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


I'm afraid I don't understand the use-case. But if you have low-level 
concrete questions that don't get answered on this mailing list, you could 
try asking on the Git developers' mailing 
list: https://gist.github.com/tfnico/4441562

I think if I was writing a framework that would operate on Git 
repositories, I would use some library like libgit2 to interoperate with 
the repositories, instead of using the rather limited HTTP protocol. There 
is a dormant project that implements libgit2 bindings in PHP 
here: https://github.com/libgit2/php-git

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