Install a Git Server Gitolite v3

Looking into installing our own Git Server. Probably going with Gitolite. Did a test run on my dev Linux box got environment setup, but having some trouble adding users and initial repository.

Company gave me a Windows server to working. Reading the blogs about installing a Git Server on Windows looks pretty daunting. Pushing back to get a Linux host. Got a linux box now.

Helpful Link to setup Gitolite:
BigFastBlog – did this and it worked!

Frederik Konietzny – has additional features like how to give users access to create a repository, migrate.

Wild Repos – official documentation to allow users to create repositories.

Tidbits:

To create rsa ssh keys:

ssh-keygen -t rsa -f ID_rsa # the -f option sets filename of the key file

ssh-keygen -t rsa

When adding a new user DO NOT use the -f option it WILL NOT WORK. I spent an hour figuring this fact out. Just the the default id_rsa.pub, copy it over where you have access to gitolite-admin, then copy to the gitolite-admin/keydir and rename it there.

To checkout a project:

git clone <gitolite>@<SERVER>:<project>  // where gitolite is dedicated userid that was setup

To create a repository:

git clone <gitolite>@<SERVER>:<NewRepo>
git add .
git commit -m 'Initial checkin'
git push

To allow users to create repositories:

in conf/gitolite

repo [a-zA-Z0-9].*                  # allow repos at root level with any name.
C       =   mfang @admin            # who can create repos. ie user, group
RW+     =   CREATOR                 # read documentation for CREATOR
RW      =   WRITERS @admin          # read documentation for WRITERS
R       =   READERS @staff          # read documentation for READERS

Advertisements
This entry was posted in Git and tagged , , , , . Bookmark the permalink.

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