I'm working with two servers, one for testing and one productive. I'm configuring gitolite to work with http protocol (ssh protocol is also working). I've follow the instructions from this page http://gitolite.com/gitolite/ssh-and-http.html
In my testing server everything worked perfect, I'm able to clone a repo with git clone http://user:[email protected]/gitolite/repo.git. Then, I copied everything from my testing server to my productive server, so all configurations (to make gitolite work with http) are exactly the same. But when I run git clone http://user:[email protected]/gitolite/repo.git I get fatal: unable to access http://user:[email protected]/gitolite/repo.git: The requested URL returned error: 500
I've checked logs, and suexec log is not generated, only error_log and it shows
[Thu Apr 30 11:19:32 2015] [error] [client xx.xx.xx.xx] (13)Permission denied: exec of '/usr/sbin/suexec' failed
[Thu Apr 30 11:19:32 2015] [error] [client xx.xx.xx.xx] Premature end of script headers: gitolite-suexec-wrapper.sh
According to this, suexec_log is not generated because suexec never run. The second line of error is generated for the same reason. So the problem here is the first error, but I don“t know what permission is missing. I've compared all files and permissions between both servers and they are equal.
I've googled, but none of the solutions worked for me. BTW, SElinux is disabled in both servers.
Can ay one help me?, Thanks
Edit 1: Add requested info
user/group for gitolite: repository/repository
folder containing gitolite-suexec-wrapper.sh: /var/www/bin
permissions for bin folder: 0755
owner/group for bin folder: repository/repository
permissions for gitolite-suexec-wrapper.sh: 0700
owner/group for gitolite-suexec-wrapper.sh: repository/repository
gitolite-suexec-wrapper.sh content
#!/bin/bash
#
# Suexec wrapper for gitolite-shell
#
export GIT_PROJECT_ROOT="/home/repository/repositories"
export GITOLITE_HTTP_HOME="/home/repository"
exec ${GITOLITE_HTTP_HOME}/gitolite/src/gitolite-shell
As I said in my last comment, it was an internal network issue with that machine.
Now I've installed and configured git/gitolite trough ssh and http on another machine and everything works perfect, following the instructions from the gitolite website. I had just one little problem and I solved it by changing the configuration of SElinux from enforced to permissive mode (execute
setenforce 0from command line)