Install Redmine in Centos and integrate git

Source: Internet
Author: User
Tags redmine

Install Redmine in Centos and integrate git

First obtain the Installation File

wget https://downloads.bitnami.com/files/stacks/redmine/2.6.1-0/bitnami-redmine-2.6.1-0-linux-x64-installer.run

Add executable permissions

chmod +x https://downloads.bitnami.com/files/stacks/redmine/2.6.1-0/bitnami-redmine-2.6.1-0-linux-x64-installer.run

Install

./bitnami-redmine-2.6.1-0-linux-x64-installer.run

Configuration of all content here, including git, cannot be performed here because there is no record during installation. Specifically, yes is selected for almost all configurations, as port 80 is occupied, I configure the apache port to 8080 during configuration.

After the installation is complete, access http: // host IP: 8080/redmine/to log on.

Create a test project after logon.

Install the git Server

Install python-setuptools

sudo apt-get install python-setuptools

Download gitosis

<pre name="code" class="java">https://github.com/tv42/gitosis.git

Go to the gitosis directory 

cd gitosis

Install
python setup.py install

Create a git account

sudo useradd -c 'git version manage' -m -d /home/git -s bin/bash  git


Upload the secret key produced by the client to the server. For the generation method, see generate a secret key.

Initialize git

sudo -H -u git gitosis-init < /home/git/id_rsa.pub

The following information is displayed successfully. 

#Initialized empty Git repository in /home/git/repositories/gitosis-admin.git/#Reinitialized existing Git repository in /home/git/repositories/gitosis-admin.git/
Modify post-update permission

sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update

Client clone repository for configuration

Git clone git @ host IP: gitosis-admin.git

After cloning, the keydir directory stores the public key and gitosis. conf is the configuration file.

Open the configuration file, add the following content, and place the Public Key recwert@webca.cc.pub of another machine under the Public Key Directory

[group webca]writable = webcamembers = victor@webca.cc recwert@webca.cc

Submit the webca repository using the initialized client victor@webca.cc, the Code is as follows:

Mkdir webca cd webca git init touch README. md git add README. md git commit-m "init webca" git remote add origin git @ host IP: webca. git push origin master

Configure redmine to associate with the git repository, click the created test project-> Configuration-> Version library-> Create a version library-> select git-> enter the git directory, here is/home/git/repositories/webca. git, check the master database to confirm.

404 may occur at this time, probably because of webca. git has insufficient permissions. To avoid unnecessary troubles in the future, you can directly give the 777 permission to the directory and refresh it to view the submission information of the version library.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.