L'installation de gitolite » Historique » Version 1
Version 1/11
-
Suivant » -
Version actuelle
Yanick Delarbre, 09/11/2011 12:28
L'installation de gitolite¶
# dpkg-reconfigure locales Règles le warning à propos des locales non configurés #La clé de l'admin client$ .ssh/id_rsa.pub root@rhizome-fai.net:/tmp/nebula.pub server# apt-get install gitolite -y server# su - gitolite #Initialisation du repository admin gitolite@server$ gl-setup /tmp/nebula.pub client$ git clone gitolite@rhizome-fai.tetaneutral.net:gitolite-admin.git client$ cd gitolite-admin #Les clés des clients client$ mv cle.pub key/ #La configuration de chaque repository client$ vim conf/gitolite.conf repo gitolite-admin RW+ = user repo testing RW+ = @all repo agregation RW+ = user nebula jocelyn fernando R = daemon client$ git add conf/gitolite.conf key/* client$ git commit -m "add repo agregation + git-daemon in R" #Note: toutes la confiration s'applique grâce à un hook. Donc il suffit de "pusher" la configuration vers le serveur client$ git push #Rendre le repository public server# apt-get install git-daemon-run -y server# vim /etc/init.d/git-daemon
Le fichier git-daemon pour éviter d'utliser sv.
#!/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:\ /usr/bin:/usr/lib/git-core NAME=git-daemon PIDFILE=/var/run/$NAME.pid DESC="git daemon" DAEMON=/usr/lib/git-core/git-daemon DAEMON_OPTS="--base-path=/var/lib/gitolite/repositories --verbose \ --syslog --detach --pid-file=$PIDFILE --user=gitolite \ --group=nogroup --enable=receive-pack" test -x $DAEMON || exit 0 [ -r /etc/default/git-daemon ] && . /etc/default/git-daemon . /lib/lsb/init-functions start_git() { start-stop-daemon --start --quiet --pidfile $PIDFILE \ --startas $DAEMON -- $DAEMON_OPTS } stop_git() { start-stop-daemon --stop --quiet --pidfile $PIDFILE rm -f $PIDFILE } status_git() { start-stop-daemon --stop --test --quiet --pidfile $PIDFILE >/dev/null 2>&1 } case "$1" in start) log_begin_msg "Starting $DESC" start_git log_end_msg 0 ;; stop) log_begin_msg "Stopping $DESC" stop_git log_end_msg 0 ;; status) log_begin_msg "Testing $DESC: " if status_git then log_success_msg "Running" exit 0 else log_failure_msg "Not running" exit 1 fi ;; restart|force-reload) log_begin_msg "Restarting $DESC" stop_git sleep 1 start_git log_end_msg 0 ;; *) echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2 exit 1 ;; esac exit 0
server# update-rc.d git-daemon default # Pour cloner le repository client_git_public$ git clone git://rhizome-fai.tetaneutral.net/agregation.git client_git_user$ git clone gitolite@rhizome-fai.tetaneutral.net:agregation.git
Les sources¶
http://doc.ubuntu-fr.org/gitolite#rendre_un_depot_public
http://computercamp.cdwilson.us/git-gitolite-git-daemon-gitweb-setup-on-ubunt