Raw Notes in installing a personal GIT repository In an apache personal home pages area from Vladmir Estivill-Castro First change umask so webserver can act on the git under my public_html umask 022 Change into cd public_html/ mkdir git cd git touch log.txt chmod 666 log.txt Create a cgi for forwarding vi git.cgi #!/bin/sh export GIT_PROJECT_ROOT=/home/user/public_html/git export GIT_HTTP_EXPORT_ALL=1 exec 2>>log.txt echo >&2 "-----------------------" date >&2 "+%Y-%m-%d_%H:%M:%S" git http-backend "$@" || echo failed >&2 EXIT the vi chmod 0755 git.cgi vi gc.cgi #! /bin/sh echo 'Content-Type: text/plain' echo for repo in *.git; do printf "%s ... " "$repo" (cd "$repo" && git gc) && echo "OK" || echo "failed" done chmod 755 gc.cgi umask 0 git init --bare test.git cd test.git/ echo "Testing a git repo" > description git config --file config http.receivepack true cd .. Set up the access vi .htaccess Options +ExecCGI AddHandler cgi-script cgi chmod 644 .htaccess You can test this to clone and pull and push WARNING, no users yet git clone http://www.domain/user/git/git.cgi/test.git But editing again creates users on the web server Add to .htaccess file... vi .htaccess AuthUserFile /home/user/public_html/git_repos/.htpasswd AuthType Basic AuthName "Private GIT Repository" Require valid-user Create the .htpasswd (using whatever method is appropriate) /opt/rh/httpd24/root/usr/bin/htpasswd htpasswd .htpasswd user New password: my secret password Re-type password: my secret password Adding password for user user chmod 644 .htpasswd