GIT Server /CentOS7
Git Install
[root@localhost]# yum install git-1.8.3.1-6.el7_2.1.x86_64 -y
Apache Setting
According to the GitBook.
[root@localhost]# vi /etc/httpd/conf.d/git.conf
SetEnv GIT_PROJECT_ROOT /var/www/git/repos
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/repos /usr/libexec/git-core/git-http-backend
<Location /git/repos>
DAV on
AuthType Basic
AuthName "Subversion git repositories"
AuthUserFile /etc/svn/auth-users
Require valid-user
</Location>
Initial Git Repository
[root@localhost]# cd /var/www/git/repos
[root@localhost repos]# git --bare init
Folder permissions
[root@localhost git]# chown -R apache:apache /var/www/git/repos
SELinux
Thanks for this svn server tutorial.
## Set security context ##
chcon -R -t httpd_sys_content_t /var/www/git/repos
## Following enables commits over http ##
chcon -R -t httpd_sys_rw_content_t /var/www/git/repos