Outils pour utilisateurs

Outils du site


en:computing:network_system:installation_d_un_serveur_gitolite_redmine

Ceci est une ancienne révision du document !


References :

Install needed packages

First install thin web server, gitolite for git hosting and redmine to manage your project.

$ sudo apt-get install gitolite redmine thin

Install plugin

To make gitolite and redmine able to exchange, we need to add a plugin to redmine. Clone the plugin from github.

$ cd /usr/share/redmine/vendor/plugins/
$ sudo git clone git://github.com/gdoffe/redmine-gitolite.git

Add ruby dependancies.

$ sudo gem install net-ssh lockfile ruby-openid
$ sudo gem install gitolite --pre

Configuration

Launch redmine and plugins database init.

sudo RAILS_ENV=production rake db:migrate_plugins
sudo RAILS_ENV=production rake db:migrate_plugins
sudo RAILS_ENV=production rake redmine:load_default_data

Configure thin web server to listen for redmine requests.

$ sudo thin config -C /etc/thin/redmine.yml -c /usr/share/redmine --servers 1 -e production --user git --port 80

Create a folder where the plugin will store the git repositories.

$ sudo mkdir /var/cache/redmine/repositories

Create a special user gitolite which will be used by the redmine plugin to talk with gitolite.

$ sudo addgroup gitolite
$ sudo adduser --disabled-password --home /home/gitolite --ingroup gitolite gitolite

As gitolite application uses ssh to access git repositories, generate your ssh keys to be administrator.

This is the Linux user account that will be the first administrator of your gitolite server. Note it carefully, we will need it later.

$ ssh-keygen -t rsa
$ cp ~/id_rsa.pub /tmp/<mon_login>.pub

Now log in as gitolite user to launch gitolite setup process.

$ sudo su - gitolite
$ gl-setup /tmp/<mon_login>.pub

Copy a git hook to keep redmine projects synchronised with git repositories.

$ cp /usr/share/redmine/vendor/plugins/redmine-gitolite/contrib/hooks/post-receive-redmine_gitolite .gitolite/hooks/common/post-receive

Now edit .gitolite/hooks/common/post-receive file to set DEFAULT_REDMINE_KEY and DEFAULT_REDMINE_SERVER as in redmine settings. Respectively API Key et Host name and path.

Enable WS for repository management must be checked in order to generate the API key.

Default login/password for redmine administration is admin/admin .

Delete hooked flag from all repositories and re-launch setup to propagate the hook.

$ rm `find repositories/ -name gitolite-hooked -print`
$ gl-setup

$ exit $ sudo su - $ ssh-keygen -t rsa $ sudo cp ~/.ssh/id_rsa.pub /tmp/root.pub $ exit $ cd /tmp $ git clone gitolite@localhost:gitolite-admin $ cd gitolite-admin/ $ cp /tmp/root.pub keydir/ $ git add keydir/root.pub $ vim conf/gitolite.conf

en/computing/network_system/installation_d_un_serveur_gitolite_redmine.1331038013.txt.gz · Dernière modification: 2012/09/20 10:53 (modification externe)