Posted in Git, Server, Service

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.

$) sudo adduser gitolite

$) sudo adduser git


$) su – git

$) git clone git@

$) ./gitolite/install


$) su – gitolite

$) ssh-keygen

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


$) su – git

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


# Add Client User

$) su – gitolite

$) git clone git@localhost:gitolite-admin.git

$) cd gitolite-admin/keydir

$) scp [user_name]@localhost:/home/[user_name]/.ssh/ . [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 [repo_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




HOiT Creator

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s