Dear all,

I am setting up an online documents system and have been trying to use git 
for the version control. That is to say, git works fine from the command 
line, but when I try to interface it with apache I keep getting 'bad file 
descriptor' and 'unable to create temporary file: No such file or 
directory' errors. Here is a typical output from the log file:

: executing: cd /var/www/html/confix; echo $PATH 2>&1;
: output: /sbin:/usr/sbin:/bin:/usr/bin

: executing: cd /var/www/html/confix; git init 2>&1;
: output: Initialized empty Git repository in /var/www/html/confix/.git/

: executing: cd /var/www/html/confix; git add * 2>&1;
: output:
: executing: cd /var/www/html/confix; git commit -m 'first version' 2>&1;
: output: error: unable to create temporary file: No such file or directory
Error building trees

: executing: cd /var/www/html/confix; git clone /var/www/html/confix 
/var/www/html/saved/tom/var/www/html/confix 2>&1
: output from clone: Cloning into 
 fatal: read error: Bad file descriptor
 warning: You appear to have cloned an empty repository.
 fatal: write error: Broken pipe

: executing: cd /var/www/html/saved/tom/var/www/html/confix; git commit -a 
-m '2013-07-10 12:52:52' 2>&1;
: output from commit: fatal: Not a git repository (or any of the parent 
directories): .git

It seems to fall over at "git commit -m 'first version' " with 'unable to 
create temporary file'. Now I have no idea what temporary file it is trying 
to create or why it is unable to create it. (Can I get more detailed error 
messages somehow?)
Of course this sequence works just fine from the command line.

By the way I have tried (painstakingly/to the death!) file permissions. It 
is not these. All files belong to apache. I have also considered 
environment variables - that is mainly the $PATH environment variable (I am 
not sure what others could be involved. I couldnt find any reference to 
needing special environment variable settings to run git - aside from 
ensuring it could find the git binary itself - if anyone knows otherwise 
then please let me know). I have checked apache can access and write to 
that directory. It can.

I am stuck as I have no idea what to do next. Can anyone at least point me 
in the direction of how to proceed from here?

Some other info: I am calling git using perl 5.10, currently just using the 
backtick operator (though I was using Git::Wrapper, but no difference, same 
sort of errors occurring)
Apache is 2.2.15 on CentOS 6.3. Let me know if you need any other info. 

Any help greatly appreciated!

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 
For more options, visit

Reply via email to