Gitolite Essentials

Gitolite Essentials
eBook: $17.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $47.98    Print cover: $29.99
save 6%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Learn to manage the many repositories and the users accessing these repositories in the Git server
  • Walks you through the most important ideas and concepts in Gitolite supported by examples and use cases
  • Master the most powerful tool for fine-grained access control of Git repositories

Book Details

Language : English
Paperback : 120 pages [ 235mm x 191mm ]
Release Date : April 2014
ISBN : 1783282371
ISBN 13 : 9781783282371
Author(s) : Sitaram Chamarty
Topics and Technologies : All Books, Big Data and Business Intelligence, Networking and Servers, Open Source

Table of Contents

Chapter 1: Getting Started with Gitolite
Chapter 2: Installing Gitolite
Chapter 3: Your Users and Gitolite
Chapter 4: Adding and Removing Users
Chapter 5: Managing Repositories
Chapter 6: Getting Started with Access Control
Chapter 7: Advanced Access Control and Configuration
Chapter 8: Allowing Users to Create Repos
Chapter 9: Customizing Gitolite
Chapter 10: Understanding VREFs
Chapter 11: Mirroring
  • Chapter 1: Getting Started with Gitolite
    • Common Access Control needs
    • Access Control example with Gitolite
    • Sampling of Gitolite's power features
      • Creating groups
      • Personal branches
      • Personal repositories
    • Gitolite and the Git control flow
    • Trying out Gitolite
      • Preparing for the setup
      • Installing and setting up a test instance
      • Playing with Gitolite
    • Summary
  • Chapter 2: Installing Gitolite
    • Gitolite users and the hosting user
      • Distinguishing users from each other
    • Preparing the server
    • Getting the Gitolite source
    • Installing the code
    • Setting up Gitolite
      • Creating an ssh key pair
      • Running the setup command
      • Checking over your new Gitolite server
      • Adding a user
      • Adding a repository
    • Summary
  • Chapter 3: Your Users and Gitolite
    • Accessing Git repositories
      • Git servers, SSH, and HTTP
    • Accessing Gitolite repositories
      • SSH key pairs
      • Repository naming
    • Getting information from Gitolite
    • Gitolite commands
    • Getting help for commands
    • Troubleshooting SSH issues
      • Authorization, not authentication
      • Duplicate public keys
      • Diagnosing public key problems
      • SSH best practice
    • Summary
  • Chapter 4: Adding and Removing Users
    • Adding users
      • Behind the scenes
    • Users with multiple key pairs
    • Giving some users a shell
    • Managing keys outside Gitolite
    • Getting user group information from LDAP
    • Removing users
    • Summary
  • Chapter 5: Managing Repositories
    • Adding repositories
    • Adding existing repositories
    • Common problems and troubleshooting
      • Ownership and permissions
      • Converting a non-bare repository to a bare repository
      • Gitolite and the update hook
    • Summary
  • Chapter 6: Getting Started with Access Control
    • Basic access control examples
      • Basic branch level access control
    • Lexical syntax of the conf file
    • The syntax of access control rules
    • Branch level access control and refexes
      • Using deny rules
      • The permission field
    • Defining user and repo groups
      • Working with large groups
      • The special @all group
    • The include statement
    • Rule accumulation and delegation
    • Summary
  • Chapter 7: Advanced Access Control and Configuration
    • Making changes to the rc file
    • Giving users their own branches
    • Types of write operations
    • Allowing Gitweb and Git-daemon access
      • Locating the projects list file
      • Unix permissions and the umask
    • Specifying Git config values and Gitolite options
      • Deleting a git-config key
      • Substituting the repository name
      • Overriding config values
      • Gitolite options
    • Applying deny rules to read access
    • Understanding VREFs
    • Summary
  • Chapter 8: Allowing Users to Create Repos
    • Putting repositories in Sub-directories
    • Repository wildcards
      • Creating a wildcard repository
      • Giving access to other users
      • Generalizing the ruleset
    • Explaining wild repos to your users
    • Managing with just wild repos
    • Deleting wild repositories
    • Summary
  • Chapter 9: Customizing Gitolite
    • Core and non-core Gitolite
    • Types of non-core code and examples
      • Commands
      • Syntactic sugar
      • Triggers
      • Virtual refs
    • Writing your own non-core code
    • Summary
  • Chapter 10: Understanding VREFs
    • Migrating update hooks
    • Passing arguments to the VREF code
    • Using the permission field
      • Maintaining the update hook function
    • Default is success
    • Example VREFs and their usage
    • Writing your own VREF
    • Summary
  • Chapter 11: Mirroring
    • Terminology and basic concepts
      • Repository level mirroring
      • The gitolite-admin repository
    • Setting up mirroring
      • Example setup
      • Bootstrapping the mirroring process
      • Mirroring other repositories
    • Local repositories and hostname substitution
    • Redirecting pushes
    • Manual synchronization
    • Switching to a different master
    • Summary

Sitaram Chamarty

Sitaram Chamarty has been in the software industry for a number of years. He is a Linux and open source evangelist who has sometimes been called an "open source bigot", which he takes as a compliment. He loves Perl enough to believe, or at least insist, that xkcd 224 is actual fact.

His day job is with Tata Consultancy Services, and he lives and works in Hyderabad, India. His job does not explicitly include evangelizing open source in general and Git in particular, but he pretends it does. He has signifi cant past experience in language conversion and tools, as well as in data warehousing.

He has a postgraduate degree in Computer Science from the Indian Statistical Institute, Kolkata, India.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


- 1 submitted: last submission 26 Jun 2014

Errata type: Technical | Page number: 53

The snippet

    include "groups.conf"

    # contains definitions of all groups used in the rest of the conf file.


    # membership changes happen here

should be 

    include "groups.conf"

    # contains definitions of all groups used in the rest of the conf file.

    # All membership changes happen here 

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Gitolite Essentials +    Bootstrap Site Blueprints =
50% Off
the second eBook
Price for both: $31.95

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Secure a Git server that has many repositories and many users accessing it
  • Manage the growth of the server, both in the number of users and the number of repositories, with minimal hassle
  • Allow web-based access to specific repositories only for convenience and security
  • Provide your users with the features they need to be productive with Git, while preventing them from accidentally introducing inconsistencies and errors into the repositories
  • Permit users to create their own repositories and manage their own access control list, but within the limits you set
  • Customize Gitolite for your site's unique needs and constraints quickly and easily
  • Ensure your developers always have a backup option by setting up Gitolite mirroring

In Detail

If you're responsible for securing a Git server where lots of developers work with lots of repositories, you have a problem on your hands. You probably want to implement security restrictions and authorization for certain repositories. You will love the simplicity and power of Gitolite's access control language and model. Gitolite allows you to set up Git hosting on a central server with very fine-grained access control and many powerful features.

You'll start with a brief introduction to Gitolite. The very first chapter tells you how to create a test setup so you can play with Gitolite—something that is very important when learning about a powerful tool with lots of features. You'll go from there, at an easy pace, through the most important aspects of Gitolite.

Basic access control is easy and obvious. With this book, you will learn how to restrict access to critical files, allowing users to create their own repositories and manage their own access control, but within the limits you set. You will also learn how to extend Gitolite to do very useful things with very little code, and how to fall back on a mirror in case disaster strikes your main server. All this and more is packed within this concise and practical book with easy-to-follow, real-world examples.


The book is written to suit an easy-reading style, using typical problems in access control to illustrate the need for each Gitolite feature explained.

Who this book is for

This book is for system administrators and development managers who need to keep a lid on Git-based development workflows. Basic knowledge of Git as well as of the Unix shell will be helpful.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software