Szybkie repozytorium GIT przez HTTP w Debianie
Tworzymy podkatalog w katalogu VHosta
cd /var/www/domain.com
mkdir myrepo.git
Inicjacja repozytorium
cd myrepo.git
git --bare init
Ustawienie praw dostępu
chown -R www-data:www-data .
Dostosowanie gita pod http
git update-server-info
Włączenie davfs
bash
a2enmod dav_fs
Dodanie konfiguracji davfs w /etc/apache2/sites-enabled/domain.com
, najprostsza wersja bez autoryzacji:
<Location /myrepo.git>
DAV on
AuthType None
</Location>
lub trochę bardziej bezpieczna:
htpasswd /etc/apache2/passwords/passwd_git username
<Location /myrepo.git>
DAV on
AuthType Basic
AuthName "Git"
AuthUserFile /etc/apache2/passwords/passwd_git
Require valid-user
</Location>
Restart apache
bash
apache2 -k restart
Pierwszy test przez przeglądarkę: http://domain.com/myrepo.git