Accesso ad un repository Git con gitweb: Difference between revisions

From RVM Wiki
Jump to navigation Jump to search
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:


* Impostare il path della radice dei repositories:
* Impostare il path della radice dei repositories:
  sudoedit /etc/gitweb.conf
  sudo sed -i -e 's/\/var\/cache\/git/\/files\/git\/repos/' /etc/gitweb.conf
 
$projectroot = "/files/git/repos";


* Riavviare apache
* Riavviare apache
Line 15: Line 13:
* Vedere il repo su
* Vedere il repo su
  http://mysite/gitweb
  http://mysite/gitweb


==Abilitazione autenticazione htpasswd==
==Abilitazione autenticazione htpasswd==
* Configurare apache2
* Configurare apache2


  sudoedit /etc/apache2/conf.d/gitweb.conf
  sudoedit /etc/apache2/conf.d/gitweb


<pre>
<pre>
Line 39: Line 36:
  sudo htpasswd -c /files/git/.htpasswd.gitweb mnt.vvngrl
  sudo htpasswd -c /files/git/.htpasswd.gitweb mnt.vvngrl


==Abilitazione autentiocazione PAM==
==Abilitazione autenticazione PAM==


* Vedi [[Autenticazione in Apache via PAM]]
* Vedi [[Autenticazione in Apache via PAM]]

Latest revision as of 07:51, 5 September 2011

Installazione

Gitweb consente di fare il browsing di un repository via web.

  • Installare
sudo apt-get install gitweb
  • Impostare il path della radice dei repositories:
sudo sed -i -e 's/\/var\/cache\/git/\/files\/git\/repos/' /etc/gitweb.conf
  • Riavviare apache
sudo invoke-rc.d apache2 restart
  • Vedere il repo su
http://mysite/gitweb

Abilitazione autenticazione htpasswd

  • Configurare apache2
sudoedit /etc/apache2/conf.d/gitweb
Alias /gitweb /usr/share/gitweb

<Directory /usr/share/gitweb>
  Options FollowSymLinks +ExecCGI
  AddHandler cgi-script .cgi

  AuthType Basic
  AuthName "Private GitWeb Access"
  AuthUserFile /files/git/.htpasswd.gitweb
  Require valid-user
</Directory>
  • Creare il file di autenticazione
sudo htpasswd -c /files/git/.htpasswd.gitweb mnt.vvngrl

Abilitazione autenticazione PAM

Riferimenti