0

Redmine, Bitbucket, and Git Repositories

Redmine is a wonderful system for programming based project management and allows many helpful features to anyone working through programming projects.  It can also be used as a simple (non-financial based) project management and ticketing system.

I've been using Redmine for various projects over the last several years starting with a 0.8.* version up to the 2.4.2 version.

Overview:

First, I would highly recommend using a pre-fab virtual appliance for Redmine such as those put out by Bitnami or TurnKey.  If you're going to install onto an existing system, make sure you have backups of the original system.  I have yet to have a Redmine install that hasn't required major tweaks and work afterwards; sometimes, even this includes the appliances.

This assumes you already have a functional Redmine installation with Git installed.  I am operating off of a Bitnami virtual appliance (for reference).  If you don't, use Googlefoo to locate installation instructions for both.  Unfortunately, the documentation for Redmine isn't always very clear so it's better to search for what you can find on Google rather than for me to include static links to pages that may end up breaking your installation.

Now, I tried several Redmine to Bitbucket plugins prior to the route that I went, all of these failed out, one even broke my installation.  Because of this I started looking for slightly alternative ways to accomplish the same thing.

I found this: http://blog.bigpixel.ro/2011/12/syncronizing-redmine-bitbucket-repositories/

It describes the basics of how to get things going, but there's a few key things missing that make all the difference in the world that I think need to be pointed out, thus this article.

Cloning:

When you clone, you should make sure to use the –bare option.  This will make sure the files aren't checked out and it will enable your repository to work correctly when you add the pathing to it.  Now, keep in mind that this applies to repositories that you do not plan to develop from, they'll just be copies.

git clone --bare [email protected]:/account/reponame

If you intend to develop from the repository as well, then you should not use the –bare option but you will need to include /.git on the end of your repository pathing in Redmine.  So your path in the Redmine settings area would look like this:

/path/to/repo/REPONAME/.git

Last, the entry related to setting up a push to the Redmine instance doesn't seem to work.  I would suggest using a cronjob to get this working.

One additional reference I found helpful was this video: http://www.dailymotion.com/video/xmifl2_add-git-repository-to-redmine_tech

Torry Crass

Leave a Comment