Git Management with gitolite.

The concept is to manage a git repository with an single gitolite user(account), not create users(accounts) for all git users.

$) git adduser gitolite

$) git adduser git

 

$) su – git

$) git clone git@https://github.com/sitaramc/gitolite.git

$) ./gitolite/install

 

$) su – gitolite

$) ssh-keygen

$) scp ~/.ssh/id_rsa.pub git@localhost:/home/git/.ssh/gitolite.pub

 

$) su – git

$) ./gitolite/src/gitolite setup -pk ~/.ssh/gitolite.pub

 

# Add Client User

$) su – gitolite

$) cd  gitolite-admin/keydir

$) scp [user_name]@localhost:/home/[user_name]/.ssh/id_rsa.pub . [user_name].pub

$) git add ./keydir/[user-name].pub

$) git commit -am “add user ‘[user_name]'”

$) git push

 

# Add A Repository

$) vi ./gitolite-admin/conf/gitolite.conf

repo gitolite-admin
    RW+     =   gitolite

repo testing
    RW+     =   @all

repo test
    RW+     =   [user_name]

$) git commit -am “add a [user_name] repository.”

$) git push

 

# Retrieve A Git Repository At A Client

$) su – [user_name]

$) git clone git@localhost:test.git

 

# Git Remote Reference and Branch
$) git ls-remote

$) git remote show

 

 

Reference Source
: http://www.whatwant.com/331
: https://git-scm.com/book/ko/v2/Git-%EB%B8%8C%EB%9E%9C%EC%B9%98-%EB%A6%AC%EB%AA%A8%ED%8A%B8-%EB%B8%8C%EB%9E%9C%EC%B9%98

 

Advertisements
Git Management with gitolite.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s