Coder Social home page Coder Social logo

takenory / scm-creator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from farend/scm-creator

0.0 2.0 0.0 157 KB

Small plugin for local Subversion, Git, Mercurial, Bazaar and remote Github repository creation.

License: GNU General Public License v2.0

Ruby 88.72% HTML 10.46% JavaScript 0.70% CSS 0.13%

scm-creator's Introduction

scm-creator

Fork of http://projects.andriylesyuk.com/projects/scm-creator.
The following explanation is adapted from a Origin of fork.

Simple Subversion, Git, Mercurial,Bazaar and Github repository creation plugin for Redmine. With this plugin repository creation and registration becomes very easy and needs just one click (or even no click).

Description

The plugin adds “Create new repository” button to the repository addition form (Project → Settings → Repository → Subversion/Git/Mercurial/Bazaar/Github).
With just one click on this button a user can create local repository and register it in Redmine.
The plugin also allows to create repository automatically on project registration.

Github SCM is another SCM type, that comes with SCM Creator (not available in pure Redmine).

Usage

The plugin adds “Create new repository” button to the Subversion,Git, Mercurial, Bazaar and Github repository creation form (“Repository” tab in project settings):

scm-creator-settings

The plugin will automatically fill in the repository URL field with the root directory1 and project identifier.
To create new local2 repository you just need to click the “Create new repository” button.It is also possible to configure the plugin to create repositories automatically for new projects.

! If you are using Redmine based authentication for repositories access (what is recommended) the repository name3 must be identical to the project identifier.

The plugin will create the repository for you and automatically register it in Redmine(no need to additionally click on the “Create” button below the form).

Install

Assuming you already have installed Subversion, Git, Mercurial and/or Bazaar and the Apache DAV module. Please refer to your operating system manual on how to do this if not.

1. Creating root directory

First you need to choose where repositories are going to be stored and to create this directory. For example, for SVN I chose /var/lib/svn.

# mkdir /var/lib/svn

This directory should be writtable by the user Redmine is ran from (this can be www-data, apache or nobody - depending on the OS4).
Change the owner and the group:

# chown www-data:www-data /var/lib/svn

If you are not sure about the owner try running the following command:

# ps aux | grep ruby
www-data 32262  4.3 12.1 262304 127864 ?       S    14:39  15:55 ruby
/usr/share/redmine/public/dispatch.fcgi

Also make sure the directory can be written by the user:

# ls -l /var/lib | grep svn
drwxr-xr-x 18 www-data www-data 4096 May 17 12:44 svn

To change permissions do:

# chmod 0755 /var/lib/svn

Do the same for Git, Mercurial and/or Bazaar.

2. Configuring the plugin

The plugin reads its configuration from #{RAILS_ROOT}/config/scm.yml. Copy sample scm.yml file from the plugin directory to #{RAILS_ROOT}/config/ and modify it.

The configuration of the plugin is described in details on the corresponding page. Check this page for common configuration scenarios.

3. Automatic creation

You can configure the plugin to create a repository automatically when a project is registered. For this change the auto_create option to true or force (for meanings of these values check this page).
When the automatic creation is enabled the project registration form will have an additional field:

scm-creator-project

4. Installing plugin

To install the plugin do:

  • Install Ruby Octokit
    • If you plan to create Github repositories or register hooks there.
  • Install plugin:
cd /path/to/redmine/plugins  
git clone https://github.com/farend/scm-creator.git redmine_scm
rake redmine:plugins:migrate RAILS_ENV=production
  • Restart Redmine

5. Configuring Apache/DAV

It is recommended to configure your SVN/Git/Mercurial server to use usernames, passwords and permissions from the Redmine database.

Refer the following links on what to do next:

Note: For Redmine based SVN/Git/Mercurial authentication to work the repository name and the project identifier must be identical.

LICENSE

Copylight (C) 2017 FAR END Technologies Corporation Originally under GPL v2 in Andriy Lesyuk, http://subversion.andriylesyuk.com/scm-creator/


1 specified in scm.yml
2 in terms of Redmine server
3 last directory in repository URL
4 this page describes installation under Unix-like OSes only

scm-creator's People

Contributors

ishikawa999 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.