[CentOS] Use Gitolite to build git server

Source: Internet
Author: User

1. Create a user

#创建gitadmin用户useradd gitadmin# set gitadmin password passwd gitadmin# create git user useradd git# set git password passwd git

2. Create an SSH key

#切换到gitadmin > Su gitadmin# create an ssh key > ssh-keygengenerating public/private RSA key pair. #注意, The following gitadmin is the input entered into the which to save the key (/HOME/GITADMIN/.SSH/ID_RSA): gitadmin# below the direct carriage can enter passphrase ( Empty for no passphrase): #下面直接回车就可以Enter same passphrase again:

This time, you can see these two files under the/home/gitadmin/.ssh

Gitadmingitadmin.pub

Copy gitadmin.pub to temp directory

Cp/home/gitadmin/.ssh/gitadmin.pub/tmp

3. Set up a git user

#登录git用户su git

Set up a Gitolite project

git clone git://github.com/sitaramc/gitolitemkdir-p $HOME/bingitolite/install-to $HOME/bin

Set Gitadmin user as Super admin

#复制上面的ssh密钥cp/tmp/gitadmin.pub ~/#设置成为超级管理员gitolite setup-pk gitadmin.pub

4. Manage the project through Gitolite

#切换到gitadmin用户su gitadmin# build gitolite project management repository git clone [email protected]:gitolite-admin# then enter gitadmin password!

At this point, the general completion of the construction of the environment. Detailed user and warehouse settings can be found here: https://github.com/sitaramc/gitolite

Has fun with git!

[CentOS] Use Gitolite to build git server

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.