Easily Integrate a GitHub Repository with Redmine using The GitHub Hook Plugin
- 3
- Add a Comment
Back in April, I explained how to use a GitHub repository with Redmine using Cron. If that seemed complicated, do not worry, there is now an easier way. I was recently asked for my opinion on a Redmine plugin called GitHub Hook.
How this plugin works is simple. After installing the plugin, just clone the GitHub repository like normal and setup Redmine to use that repository. Next, you simply create a new Post-Receive hook in your project’s Admin tab on GitHub. After that is done, you are good to go. Now every time a commit is pushed to the GitHub repository, GitHub will send a notification to Redmine and the git repository on your server will be updated.
I thought I would test this plugin with WicketPixie. I had already been using the cron approach I had described, and this plugin seemed to greatly simplify the process. First, on my server, I entered the vendor/plugins directory of my Redmine installation and cloned the GitHub Hook plugin from GitHub:
cd /home/eddie/app/redmine/vendor/plugins git clone github.com/koppen/redmine_github_hook.git
Next I followed the standard Redmine plugin installation procedures and restarted my Rails server:
sudo service thin restart sudo service nginx restart
Those four lines are the only commands you will need to enter into a console to setup this plugin, but I still need to clone the WicketPixie repository:
mkdir /home/eddie/app/redmine/repositories cd /home/eddie/app/redmine/repositories git clone github.com/eddieringle/wicketpixie.git
After that, I set Redmine to use that repository for the WicketPixie project:
Now all that is left to do is adding the Post-Receive URL on GitHub. GitHub has a nice guide on how to add Post-Receive URLs. The URL is yourredminesite.com/github_hook. So if my Redmine site is at code.idlesoft.net, then I would enter code.idlesoft.net/github_hook as the URL.
Now you are setup, go ahead and commit to your project and make sure that the repository updated on Redmine. Thanks to Jakob Skjerning for writing this plugin and making GitHub integration with Redmine easier!



3 Comments
LeThuy
January 12th, 2010
at 8:31pm
I can’t follow you. When I run line:
$ git clone github.com/eddieringle/wicketpixie.git
I receive:
Initialized empty Git repository in /var/www/html/redmine/redmine-0.8.7/vendor/plugins/redmine_github_hook/.git/
github.com[0: 207.97.227.239]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)
I don’t know how the way to config error.
Eddie
January 20th, 2010
at 6:28pm
Works fine here, check your network connection.
chemmyone
May 29th, 2010
at 2:59pm
I would try git clone github.com/eddieringle/wicketpixie.git