Configure Git and Gitolite on the TurnkeyRedmine Virtual Machine

Source: Internet
Author: User
1. Create a git user sudoadduser -- system -- shellbinbash -- groupgitsudopassdgit2. log on to the su-git3 as git. Download and install Gitolitegitclonegit: github. Steps-system-install follow the steps below: gitolite

1. CreateGitUser

SuDoDdUser -- system -- shell/bin/bash -- group git

Sudo passd git

2. Log On As a git user

Su-git

3. Download and install Gitolite

Git clone git: // github.com/sitaraMc/Gitolite

CdGitolite

Src/gl-system-install

Refer to the following steps:

Gitolite is rewritten by gitosis using perl. It is easier to use and has a higher security level.

Refer:

-Gitolite: http://github.com/sitaramc/gitolite

-Pro Git: http://progit.org/book/ch4-4.html

I used Ubuntu as an example. It is best to try it out without the knowledge of ssh. No one knows where the error will be ;-)

Server (Ubuntu 10.2 lucId, User, 192.168.56.151)

Client (windows vista msysgit, larrycai)

1. Download The gitolite package.

I am lazy, download directly. deb package installation (not Ubuntu default, to find the source) http://packages.debian.org/unstable/main/gitolite, 1.5.3-1 (2010.7.2 is the latest)

User @ Ubuntu :~ $ Sudo dpkg-I gitolite_1.5.3-1_all.deb
User @ Ubuntu :~ $ Dpkg-L gitolite_1.5.3-1_all.deb
/Etc/gitolite
..
/Usr/bin/gl-SetUp
..

Git users are configured during installation.

2. Configure the Administrator (your account is like larrycai)

Generate a key pair on the client (windows vista msysgit) and transmit the public key to the server.

(Client)

$ Ssh-keygen

(The password is blank)

$ SCp~ /. Ssh/id_rsa.pub user@192.168.56.151:/tmp/larrycai. pub

(Server)

User @ Ubuntu :~ $ Sudo su-git

Git @ Ubuntu :~ $ Gl-Setup/Tmp/larrycai. pub

..

Creating gitolite-admin...

InitializEdEmpty Git repository in/home/git/repository/gitolite-admin.git

(Client)

$ Git clone git@192.168.56.151: gitolite-admin copy the Code if everything goes well, it's done, of course, 80% may go wrong on ssh.

3. Added git repository

The advantage of gitolite is that all management is in the gitolite-admin git library. Add "proj" git repository

$ Git clone git@192.168.56.151: gitolite-admin

$ Cd gitolite-admin

(Edit conf/gitolite. conf)

$MoreGitolite-admin/conf/gitolite. conf

Repo proj

RW + = @ all

$ Git commit-a-m "add new repo proj"

$ Git push

..

Remote: creating proj ..

Remote: Initialized empty Git repository in/home/git/repositories/proj. git /.

.. Copy the code. Now you can use proj git repository.

$ Git clone git@192.168.56.151: proj

 

 

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.