Assume SELinux is disabled on your Git server…
The following setup is on CentOS and assume your Git repositories are all located under /data/repos.
1. Install Git and Apache.
yum install git httpd
2. Create the /etc/httpd/conf.d/git.conf.
# Git over HTTP <VirtualHost *:80> SetEnv GIT_PROJECT_ROOT /data/repos SetEnv GIT_HTTP_EXPORT_ALL ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/ <Location /git/> AuthType Basic AuthName "Git Access" AuthUserFile /var/www/passwd.git Require valid-user </Location> </VirtualHost>