Build a git server under Linux

Source: Internet
Author: User

1. Add Git users

Useradd-m git

2. Change git user password (password is git)

passwd git

3. Unzip the git-1.7.12.2.tar.gz and install Git

TAR-XVF git-1.7.12.2.tar.gz

CD git-1.7.12.2

Make

Make install

4, initialize Git users, in order to install gitosis to prepare. To use Git on any machine, you have to initialize it for the first time:

git config--global user.name "git"

git config--global user.email "[Email protected]"

5, install setuptools-0.6c8.tar.gz, prepare for installing gitosis

TAR-XVF setuptools-0.6c8.tar.gz

CD SETUPTOOLS-0.6C8

Python setup.py Build

Python setup.py Install

6, Installation gitosis.tar.gz

TAR-XVF gitosis.tar.gz

CD gitosis

Python setup.py Install

7. Use eclipse to produce a public key, or use the following command to generate in Linux

SSH-KEYGEN-T RSA

The key is generated in the/HOME/GIT/.SSH directory

8. Use git user login to initialize warehouse

Su–git

Gitosis-init

9. Modification

chmod 755 \

/home/git/repositories/gitosis-admin.git/hooks/post-update

10. Use Eclipse to access the admin repository gitosis-admin.git

11. Import the Gitosis-admin.git warehouse as project into Eclipse, add users by adding a public key in the Keydir directory (after adding a commit), read and write permissions by modifying the gitosis.conf file (modified commit)

12, create a warehouse (we submit the code submitted to the warehouse)

mkdir Runtime.git

Git init--bare

13, modify the gitosis.conf file, increase access to the Runtime.git warehouse, use Eclipse to access the Runtime.git warehouse

Modify the following:

[gitosis]

[Group gitosis-admin]

writable = gitosis-admin

Members = RSA-1024

[Group Devloper]

writable = Runtime

Members = RSA-1024

Like on the attention

Build a git server under Linux

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.