CURRENT HEAD VERSION WORKS WITH TRUNK REDMINE (certified with 2.2.3)
THIS PLUGIN IS COMPATIBLE WITH REDMINE 2.X ONLY !
A Redmine plugin which manages your Gitolite configuration based on your projects and user memberships in Redmine.
- gitolite (works with 1.1.0)
- Gitolite server (works with v2.3.1 and v3.3)
- accessible Git executable (works with 18.104.22.168)
- Install Redmine and put this plugin in redmine/plugins directory and migrate database (plugins)
$ cd redmine/plugins $ git clone git://github.com/pitit-atchoum/redmine-gitolite.git redmine_gitolite $ cd .. $ RAILS_ENV=production rake db:migrate_plugins
- Create SSH Keys for user running Redmine
$ sudo su - redmine $ ssh-keygen -N '' -f ~/.ssh/redmine_gitolite_admin_id_rsa
- User running Redmine must have RW+ access to gitolite-admin (assuming that you have Gitolite installed).
Otherwise you can install Gitolite by following this :
Server requirements: * any unix system * sh * git 1.6.6+ * perl 5.8.8+ * openssh 5.0+ * a dedicated userid to host the repos (in this document, we assume it is 'git'), with shell access ONLY by 'su - git' from some other userid on the same server. Steps to install: * login as 'git' as described above * make sure ~/.ssh/authorized_keys is empty or non-existent * make sure Redmine SSH public key is available at $HOME/redmine_gitolite_admin_id_rsa.pub * add this in ~/.profile # set PATH so it includes user private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$PATH:$HOME/bin" fi * run the following commands: source ~/.profile git clone git://github.com/sitaramc/gitolite mkdir -p $HOME/bin gitolite/install -to $HOME/bin gitolite setup -pk redmine_gitolite_admin_id_rsa.pub
- Make sure that Redmine user has Gitolite server in his known_hosts list (This is also a good check to see if Gitolite works)
$ sudo su - redmine $ ssh git@localhost * [accept key]
You should get something like that :
hello redmine_redmine, this is gitolite v2.3.1-0-g912a8bd-dt running on git 22.214.171.124 the gitolite config gives you the following access: R W gitolite-admin @R_ @W_ testing
hello redmine_gitolite_admin_id_rsa, this is git@dev running gitolite3 v3.3-11-ga1aba93 on git 126.96.36.199 R W gitolite-admin R W testing
- Configure email and name of Gitolite user for your Redmine account
$ sudo su - redmine $ git config --global user.email "firstname.lastname@example.org" $ git config --global user.name "Redmine Gitolite"
- Add post-receive hook to common Gitolite hooks (script is in contrib dir) and configure it (Redmine Host and API key)
$ sudo su - gitolite #login on gitolite user $ cat > .gitolite/hooks/common/post-receive * [paste hook] $ vim .gitolite/hooks/common/post-receive * [enable WS for repository management in administration->settings->repositories] * [copy generated API key] (DEFAULT_REDMINE_KEY) * [set Redmine server URL] (DEFAULT_REDMINE_SERVER) $ chmod +x .gitolite/hooks/common/post-receive $ vim .gitolite.rc * [add ".*" to the GL_GIT_CONFIG_KEYS setting * [ set $REPO_UMASK = 0022; ] $ gl-setup
- Configure plugin in Redmine settings
Found a bug?
Open new issue and complain. You can also fix it and sent pull request. This plugin is in active usage in current, edge Redmine. Any suggestions are welcome.