Accessing Local git Repositories in Redmine

January 6th, 2012

Filed under: Version Control | 1 comment

For those of you who don’t know what it is, Redmine is a tool for managing software projects and tracking bugs and other issues. One of Redmine’s features is its integration with version control systems. Suppose you have a bug in your software. You fix the bug and commit the fix to the repository. You can associate the revision number of your code fix with the bug in Redmine so you know which revision fixed the bug. Redmine supports several version controls, but I’m focusing on git because git is the only one I tested.

Configuring a repository is not difficult in Redmine. Create a project, go to its Settings section, and click the Repository tab. But the instructions to configure the repository are misleading for local git repositories. They tell you to enter the path to the repository. If you enter the path to your local git repository, such as the following:

/path/to/repository

You will get a 404 error when you try to access the repository in Redmine. You must enter the path to the repository’s .git folder for Redmine to be able to access it.

/path/to/repository/.git

If you enter the wrong repository path, discover the 404 error, and go back to correct the error by adding .git to the path, you will notice that Redmine does not let you modify the repository path. You must delete the reference to the repository and recreate it.

RedmineGitConfiguration

Click the Delete button, which is in the bottom right corner of the screenshot, to delete the reference to the repository. After deleting the reference, choose a version control system from the SCM menu and reenter the path to the repository.

Tags: ,


One thought on “Accessing Local git Repositories in Redmine

  1. Ben says:

    Really, thank you for this post!
    every damn tutorial was talking about /path/to/repo/name.git and not /path/to/repo/name/.git

    now I just have to access this repo remote over smart-http 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *