2012-09-02

Using private Rhodecode repositories with Mantis BT

As you know you can use Mantis BT and Rhodecode in conjunction to keep your issues and code connected. However this only worked if you opened up your Rhodecode repositories (either GIT or Mercurial) for everyone to read. With the latest version (0.3.1) of the Rhodecode Mantis connector you can use Rhodecode API keys to have an authenticated user get the information needed by Mantis.

Update 29-12-2012:
Version 1.5.0 of Rhodecode changes the Raw-Changeset page. For interaction with Rhodecode 1.5.x you need version 0.4.0 of the Mantis RhodeCode connector

 Installation

  • Install the Source Integration plugin into Mantis,
  • To allow api access to private repositories you need to edit the Rhodecode source files.
  • Open the file changeset.py (Mine was located in /usr/local/lib/python2.7/dist-packages/RhodeCode-1.3.6-py2.7.egg/rhodecode/controllers/changeset.py)
  • Locate '@LoginRequired()' and replace it with '@LoginRequired(api_access=True)', save the file and restart Rhodecode
  • In Rhodecode allow a user to have read-only access to that repository (I added a Read-Only group with a Mantis user)
  • Go to the admin page for that user (via http://%rhodecode%/_admin/users) and note the api-key listed there
  • Install v 0.3.1 of the Rhodecode Mantis connector into Mantis
  • Open the Plugins configuration dialog for the plugin (via http://%mantis%/plugin.php?page=SourceRcWeb/config)

  • Insert the API key from Rhodecode into the API Key field
Now you can use the Repositories function for private repositories just like public repositories