Installation de gerrit¶
http://gerrit-documentation.googlecode.com/svn/Documentation/2.2.0/install.html
Prérequis¶
aptitude install openjdk-6-jre git-core
Installation¶
Création de l'utilisateur
adduser gerrit2 su gerrit2 cd
Télécharger gerrit
wget http://gerrit.googlecode.com/files/gerrit-2.2.1.war mv gerrit-2.2.1.war gerrit.war
Initialisation
java -jar gerrit.war init -d review_site
Configuration de gerrit : éditer /etc/default/gerritcodereview
# /etc/default/gerritcodereview GERRIT_SITE=/home/gerrit2/review_site
Installer le service
sudo ln -snf /home/gerrit2/review_site/bin/gerrit.sh /etc/init.d/gerrit update-rc.d gerrit defaults
LDAP - Active Directory¶
Editer /home/gerrit2/review_site/etc/gerrit.config
[auth] type = LDAP [ldap] server = ldap://controler.regdrasil.net:389 username = CN=adreader,DC=regdrasil,DC=net password = ADpassword accountBase = CN=Users,DC=regdrasil,DC=net accountPattern = (&(objectClass=user)(sAMAccountName=${username})) accountFullName = displayName accountEmailAddress = mail accountSshUserName = ${sAMAccountName.toLowerCase} accountMemberField = memberOf groupBase = CN=Users,DC=regdrasil,DC=net groupPattern = (&(objectClass=group)(cn=${groupname}))
GitWeb¶
aptitude install gitweb
Créer un projet¶
ssh [-i private-key-file] -p 29418 gerrit-server.regdrasil.net gerrit create-project --name project-name