Install git from the yum repository
If you have error regarding GPG KEYS then please check my answer on StackOverflow.com
Install git from the yum repository
1 |
yum install git git-daemon |
Configure Git and Init bare repository
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$ cd /var/www/ $ mkdir git $ cd git $ mkdir repos.git $ cd repos.git $ git init --bare $ chown -R apache:apache /var/www/git/ $ mv /var/www/git/repos.git/hooks/post-update.sample /var/www/git/repos.git/hooks/post-update $ chmod +x /var/www/git/repos.git/hooks/post-update $ cd /var/www/git/repos.git $ sudo -u apache git update-server-info $ cd /etc/httpd/conf.d $ vim git.conf |
Apache Virtual Host directive
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<virtualhost *:80> Servername git.example.org DocumentRoot /var/www/git <directory "/var/www/git"> DAV On Options +Indexes +FollowSymLinks Deny from all AuthType Basic AuthName "Git Repository" AuthUserFile /etc/git-auth-conf AuthGroupFile /etc/git-group-conf Require valid-user </directory> </virtualhost> |
Restart Apache
1 |
$ service httpd restart |
Do you know why I am getting the following error messages?
Permission denied: exec of ‘/mnt/raid14/www/git/website2/info/refs’ failed
Premature end of script headers: refs
Thanks,
Peter
Hello Peter,
Seems like you don’t have permission to execute on mounted RAID drive.
/mnt/raid14/* => Mounted Remote Storage RAID14
I guess, you should contact your server admin or hosting company.
Best,
Gaurang
Nevermind, I’m going to use Git Smart HTTP instead of webDAV.
Thanks,
Peter