Gitolite Essentials
eBook - ePub

Gitolite Essentials

  1. 120 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Gitolite Essentials

Book details
Book preview
Table of contents
Citations

About This Book

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 Gitolitesomething 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.

Approach

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.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Gitolite Essentials by Sitaram Chamarty in PDF and/or ePUB format, as well as other popular books in Computer Science & System Administration. We have over one million books available in our catalogue for you to explore.

Information

Year
2014
ISBN
9781783282371
Edition
1

Gitolite Essentials


Table of Contents

Gitolite Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
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
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
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
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
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
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
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
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
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
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
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
Index

Gitolite Essentials

Copyright © 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2014
Production Reference: 1040414
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78328-237-1
www.packtpub.com
Cover Image by Mohamed Raoof ()

Credits

Authors
Sitaram Chamarty
Reviewers
Javier Domingo Cansino
milki
Vinh Quốc Nguyễn
Hiren Patel
Giovanni Toraldo
Acquisition Editors
Owen Roberts
Erol Staveley
Content Development Editor
Poonam Jain
Technical Editor
Manal Pednekar
Copy Editors
Roshni Banerjee
Gladson Monteiro
Project Coordinator
Jomin Varghese
Proofreader
Ameesha Green
Indexer
Hemangini Bari
Graphics
Ronak Dhruv
Yuvraj Mannari
Production Coordinator
Kyle Albuquerque
Cover Work
Kyle Albuquerque

About the Author

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 i...

Table of contents

  1. Gitolite Essentials