Tag Archives: redmine

Hacking SCM Creator and Redmine Git Hosting to Cooperate with one another

Edit June 6, 2012: SCM Creator has been updated to not conflict with Redmine Git Hosting.

Introduction

Oftentimes it’s beneficial to use more than one type of version control system within a given organization—SVN and Git being the two most popular. For the purposes of Redmine, the Redmine Git Hosting plugin is significantly more useful for handling git repositories, as it can manage public keys and is able to serve git files via the Smart HTTP Protocol. However, for the other repository types, it is generally easier to use the SCM Creator plugin, which allows the project manager to control repository creation and deletion.

Previously, these plugins were incompatible, both overriding the same method. Moreover, SCM Creator has compatibility issues with Redmine 1.4.0+. Thanks to the work of its creator, Andriy Lesyuk, however, both of these issues have been resolved!

Assumptions

  1. SCM Creator is installed in /usr/share/redmine/vendor/plugins/scm_creator, as per my guide here
  2. Redmine Git Hosting is installed in /usr/share/redmine/vendor/plugins/redmine_git_hosting, as per my guide here
  3. You want to use SCM Creator for everything that is not Git, and Redmine Git Hosting to handle all of the Git requests on its own

Configuring SCM Creator to work with Redmine Git Hosting

The configuration change here is fairly simple:

Edit the scm.yml file and add the following lines to it:

only_creator: false
allow_add_local: true

so that the final file looks like this:

$ cat /usr/share/redmine/config/scm.yml
production:
  auto_create: false
  deny_delete: false
  pre_create: /usr/local/bin/pre-create.sh
  post_create: /usr/local/bin/post-create.sh
  pre_delete: /usr/local/bin/pre-delete.sh
  post_delete: /usr/local/bin/post-delete.sh
  svn:
    path: /var/svn
    svnadmin: /usr/bin/svnadmin
    url: svn
  only_creator: false
  allow_add_local: true

and restart Apache. Everything should work properly after that!

View old version here: Expand

Introduction

If you’ve been following along my other tutorials, you’ve probably noticed that the SCM Creator and Redmine Git Hosting plugins really just don’t want to cooperate one another. The conflict here is that they both override the same method (RepositoriesController#edit), so that while they appear to work on the surface (the correct menu shows up for each), the Git repository creation results in a 500 error message in AJAX, and the repository is not created. It turns out that, due to the internal implementations of these plugins, fixing this problem isn’t terribly hard, although it does involve editing two lines in the plugin files directly.

Read More Leave a Comment

May 5, 2012

Categories:

software

Tags:

, , , , , , ,

SVN Repository Management with Redmine on Ubuntu 12.04

Introduction

Managing repository management is always a hassle for network administrators, as it usually involves going into into the shell to create the repository itself.

Redmine solves this problem using reposman.rb, which can be run regularly by a cronjob and thus automate repository creation. But this is still inconvenient—you still need to wait for the repository to be created, and you can only manage one type of SCM at once. Thus, we are going to install and configure the Redmine SCM Creator plugin to manage repository creation for us.

This tutorial is oriented primarily towards setting up SVN repository creation, as git repository management is better done by the Redmine Git Hosting plugin (Setup Guide). For instructions on how to set up Redmine, visit this tutorial before continuing on.

Read More Leave a Comment

May 3, 2012

Categories:

software

Tags:

, , , , , , ,

Redmine Git Hosting Setup on Ubuntu 12.04 LTS

Introduction

Redmine Git Hosting is a plugin for Redmine authored by Eric Bishop, further extended by John Kubiatowicz, which integrates the Git SCM system into Redmine’s project management system. At the end of this guide, you will have a server which can, from the Redmine GUI,

  • Create git repositories for projects
  • Serve git repositories via SSH, GIT, and HTTP(S)
  • Add users to git repositories

This guide is a continuation of the one here, which shows how to install and configure Redmine in Ubuntu with Virtualmin.

Read More Leave a Comment

May 1, 2012

Categories:

software

Tags:

, , , , , ,

Installing Redmine in Ubuntu 12.04 with Virtualmin

Introduction

Installing Redmine is relatively simple on Ubuntu / Debian servers as compared to any other operating system, due to its inclusion into the APT repositories. As before, all terminal commands below are assumed to be executed from the root user via SSH.

Read More Leave a Comment

April 27, 2012

Categories:

software

Tags:

, , , , ,