Git servera uzstādīšana caur Apache tīmekļa serveri
Must prepare before: Apache tīmekļa serveris |
Iespējo Apache WebDAV moduli:
sudo a2enmod dav_fsKā root lietotājs izveido failu /etc/apache2/conf.d/git ar saturu:
<Location /git/public/>
DAV on
</Location>
<Location /git/readable>
DAV on
AuthType Basic
AuthName "Need username and password to push changes"
AuthUserFile /etc/apache2/git-passwd
AuthGroupFile /etc/apache2/git-group
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require group writers
</LimitExcept>
</Location>
<Location /git/private>
DAV on
AuthType Basic
AuthName "Need username and password"
AuthUserFile /etc/apache2/git-passwd
AuthGroupFile /etc/apache2/git-group
Require group readers
</Location>kur public ir publiski pieejama mape (git projekts), readable ir anonīmi lasāma, bet rakstāma ar vārdu un paroli, private ir tikai ar vārdu un paroli lasāma mape.
Pievieno lietotājus:
htpasswd -c /etc/apache2/git-passwd studentIzveido /etc/apache2/git-group failu ar saturu:
readers: teacher
writers: studentIzveido mapi:
sudo mkdir /var/www/gitIzmaina pieejas tiesības:
chown -R www-data:www-data /var/www/gitPārstartē Apache:
sudo /etc/init.d/apache2 restart
Zināmās problēmas
- Izmantojot HTTP/HTTPS nevar aizgrūst izmaiņas ar Eclipse. Tā vietā var izmantot grūšanu caur SSH.
Alternatīvas
Tags
Programmēšana
Created by Valdis Vītoliņš on 2014-08-12 06:15
Last modified by Valdis Vītoliņš on 2021-04-13 14:29
Created by Valdis Vītoliņš on 2014-08-12 06:15
Last modified by Valdis Vītoliņš on 2021-04-13 14:29