GitLab Cookbook
()
About this ebook
GitLab is a popular, open source Git hosting solution implemented by more than 50,000 organizations. This book has some carefully chosen recipes to help you decide on the type of GitLab installation that will fit your requirements. Along with covering some of the basic principles of Git, the book covers practical scenarios to show how you or your organization can effectively manage your proprietary code.
You will learn how to manage multiple users, groups, and the permissions GitLab has for them. Updating your GitLab instance, creating backups, and restoring backups are a few of the important tasks described in detail to assist you in maintaining your GitLab server. Moreover, the GitLab API is extensively covered to guide you through the various operations to manage your project.
Related to GitLab Cookbook
Related ebooks
Git Best Practices Guide Rating: 0 out of 5 stars0 ratingsTesting Python: Applying Unit Testing, TDD, BDD and Acceptance Testing Rating: 4 out of 5 stars4/5Mastering Ansible Rating: 5 out of 5 stars5/5Node.js High Performance Rating: 0 out of 5 stars0 ratingsGit Version Control Cookbook Rating: 4 out of 5 stars4/5Git Essentials Rating: 4 out of 5 stars4/5Mastering Git Rating: 0 out of 5 stars0 ratingsDevOps. How to build pipelines with Jenkins, Docker container, AWS ECS, JDK 11, git and maven 3? Rating: 0 out of 5 stars0 ratingsDeveloping with Docker Rating: 5 out of 5 stars5/5Learn Docker - .NET Core, Java, Node.JS, PHP or Python: Learn Collection Rating: 5 out of 5 stars5/5Docker A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsLearn Kubernetes & Docker - .NET Core, Java, Node.JS, PHP or Python Rating: 0 out of 5 stars0 ratingsGit in Practice Rating: 4 out of 5 stars4/5Learning DevOps: Continuously Deliver Better Software Rating: 5 out of 5 stars5/5Mastering OAuth 2.0 Rating: 5 out of 5 stars5/5Linux in Action Rating: 0 out of 5 stars0 ratingsLearning Docker - Second Edition Rating: 0 out of 5 stars0 ratingsLearn Git in a Month of Lunches Rating: 0 out of 5 stars0 ratingsMastering Jenkins Rating: 3 out of 5 stars3/5Docker: A Quick-Start Beginner's Guide Rating: 4 out of 5 stars4/5Apache Tomcat 7 Essentials Rating: 0 out of 5 stars0 ratingsVagrant Virtual Development Environment Cookbook Rating: 5 out of 5 stars5/5Mastering Bash Rating: 5 out of 5 stars5/5DevOps Bootcamp Rating: 0 out of 5 stars0 ratingsRy's Git Tutorial Rating: 0 out of 5 stars0 ratingsGetting Started with Terraform Rating: 5 out of 5 stars5/5Getting Started with Kubernetes - Second Edition Rating: 0 out of 5 stars0 ratings
Software Development & Engineering For You
Hand Lettering on the iPad with Procreate: Ideas and Lessons for Modern and Vintage Lettering Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5How to Write Effective Emails at Work Rating: 4 out of 5 stars4/5Managing Humans: Biting and Humorous Tales of a Software Engineering Manager Rating: 4 out of 5 stars4/5Beginning Programming For Dummies Rating: 4 out of 5 stars4/5Python For Dummies Rating: 4 out of 5 stars4/5Creative Selection: Inside Apple's Design Process During the Golden Age of Steve Jobs Rating: 5 out of 5 stars5/5PYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Learning Python Rating: 5 out of 5 stars5/5iOS App Development For Dummies Rating: 0 out of 5 stars0 ratingsCoding All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsAndroid App Development For Dummies Rating: 0 out of 5 stars0 ratingsTiny Python Projects: Learn coding and testing with puzzles and games Rating: 4 out of 5 stars4/5Level Up! The Guide to Great Video Game Design Rating: 4 out of 5 stars4/5Lua Game Development Cookbook Rating: 0 out of 5 stars0 ratingsOneNote: The Ultimate Guide on How to Use Microsoft OneNote for Getting Things Done Rating: 1 out of 5 stars1/5Coding with AI For Dummies Rating: 0 out of 5 stars0 ratingsRy's Git Tutorial Rating: 0 out of 5 stars0 ratingsEngineering Management for the Rest of Us Rating: 5 out of 5 stars5/5Gray Hat Hacking the Ethical Hacker's Rating: 5 out of 5 stars5/5Blender 3D Printing Essentials Rating: 0 out of 5 stars0 ratingsiPhone Application Development For Dummies Rating: 4 out of 5 stars4/5Agile Practice Guide Rating: 4 out of 5 stars4/5Succeeding with AI: How to make AI work for your business Rating: 0 out of 5 stars0 ratingsReversing: Secrets of Reverse Engineering Rating: 4 out of 5 stars4/5SQL For Dummies Rating: 0 out of 5 stars0 ratings
Reviews for GitLab Cookbook
0 ratings0 reviews
Book preview
GitLab Cookbook - Jeroen van Baarsen
Table of Contents
GitLab Cookbook
Credits
About the Author
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
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Introduction and Installation
Introduction
Using the Omnibus package
Getting ready
How to do it…
How it works…
Setting up the server dependencies for source installation
How to do it…
How it works…
Set up the database for source installation
How to do it…
Installing GitLab from source
Getting ready
How to do it…
How it works…
Using Chef and GitLab Cookbook
Getting ready
How to do it…
How it works…
Logging in for the first time
How to do it…
How it works…
Creating your first project
How to do it…
2. Explaining Git
Introduction
Generating your SSH key on Unix-like systems
How to do it…
How it works…
Generating your SSH key on Windows
How to do it…
How it works…
Adding your SSH key to GitLab
How to do it…
How it works…
Creating your first Git project
How to do it…
How it works…
Cloning your repository and pushing code to it
Getting ready
How to do it…
How it works…
Working with branches
Getting ready
How to do it…
Performing a rebase operation
How to do it…
How it works…
Squashing your commits
How to do it…
How it works…
3. Managing Users, Groups, and Permissions
Introduction
Adding a user
How to do it…
How it works…
Creating a group
How to do it…
How it works…
Working with user permissions
Getting ready
How to do it…
How it works…
Protecting your main branches
How to do it…
How it works…
Configuring the project's visibility
How to do it…
How it works…
Removing a user
Getting ready
How to do it…
How it works…
4. Issue Tracker and Wiki
Creating your first issue
Getting ready
How to do it…
How it works…
Creating your first merge request
Getting ready
How to do it…
How it works…
Accepting a merge request
Getting ready
How to do it…
How it works…
Referencing issues
How to do it…
There's more…
Working with milestones
How to do it…
How it works…
Creating your first wiki page
How to do it…
How it works…
Managing your wiki with Gollum
Getting ready
How to do it…
How it works…
5. Maintaining Your GitLab Instance
Introduction
Updating an Omnibus installation
How to do it…
How it works…
Updating GitLab from a source installation
How to do it…
How it works…
Troubleshooting your GitLab installation
How to do it…
How it works…
Creating a backup
How to do it…
Restoring a backup
Getting ready
How to do it…
Importing an existing repository
How to do it…
How it works…
6. Webhooks, External Services, and the API
Introduction
Working with external services
How to do it…
There's more…
Using webhooks
How to do it…
How it works…
Using system hooks
How to do it…
Getting your private token for the API
How to do it…
How it works…
Understanding the API status codes
How it works…
Managing your projects via the API
Getting ready
How to do it…
Managing issues via the API
Getting ready
How to do it…
Working with other API resources
Working with the API sudo command
7. Using LDAP and OmniAuth Providers
Introduction
Setting up your LDAP server
How to do it…
Installing a web interface for LDAP
How to do it…
Adding a user to your LDAP server
How to do it…
How it works…
Configuring GitLab to use LDAP on an Omnibus installation
How to do it…
Configuring GitLab to use LDAP on a source installation
How to do it…
Setting up GitHub as an OmniAuth provider
How to do it…
How it works…
8. GitLab CI
Introduction to GitLab CI
Installing the dependencies
How to do it…
Installing the coordinator
How to do it…
Installing the web server
How to do it…
Installing a runner
How to do it…
Linking your first project to GitLab CI
How to do it…
Creating a build script
Getting ready
How to do it…
How it works…
There's more…
Using GitLab CI webhooks
How to do it…
How it works…
A. Tips and Tricks
The power of snippets
Getting involved
Getting help
The GitLab RSS feed
Archiving projects
How to format a good Git commit message
How to change your Git editor
Understanding the anatomy of GitLab
Understanding the differences between GitLab's Community Edition (CE) and Enterprise Edition (EE)
How to fork a project and what is forking?
Understanding the branching workflow
Index
GitLab Cookbook
GitLab Cookbook
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: December 2014
Production reference: 1191214
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-684-2
www.packtpub.com
Credits
Author
Jeroen van Baarsen
Reviewers
Denis Fateyev
Bert JW Regeer
George C. Guvernator V
Commissioning Editor
Amarabha Banerjee
Acquisition Editor
Vinay Argekar
Content Development Editor
Susmita Sabat
Technical Editor
Sebastian Rodrigues
Copy Editors
Rashmi Sawant
Stuti Srivastava
Project Coordinator
Kartik Vedam
Proofreaders
Simran Bhogal
Maria Gould
Ameesha Green
Paul Hindle
Graphics
Abhinash Sahu
Indexer
Tejal Soni
Production Coordinator
Aparna Bhagat
Cover Work
Aparna Bhagat
About the Author
Jeroen van Baarsen started programming at the age of 14. His language of choice was PHP. He started his first programming job at the age of 16 and worked in several companies as a PHP developer before he found out about the wonderful language that Ruby is. He then started learning this language and took up a job as a Ruby developer.
Currently, he works at Firmhouse, which is a company that helps build foundations for innovations and new business. Firmhouse has created the Ruby on Rails hosting platform at intercityup.com.
In his spare time, he contributes to GitLab's open source core team as a member. He is responsible for the merge requests that are opened by the community.
I would like to thank my girlfriend for supporting me while I was writing this book.
About the Reviewers
Denis Fateyev holds a Master's degree in Computer Science and has been working with Linux for more than 10 years (mostly with RedHat and CentOS). Currently, he works as a Perl programmer and a DevOps for a small German company. As a keen participant of the open source community, he is a package maintainer on Fedora and Repoforge projects. Foreign languages (German and Spanish) and linguistics are his passion.
He can be reached at <denis@fateyev.com>.
Bert JW Regeer is a software and systems engineer who has a wide range of skills that allow him to solve interesting and difficult problems quickly and efficiently. An avid user and developer of open source software, he enjoys working with Unix and Unix-like operating systems and has vast knowledge of not only the operating system, but also all of the software that the open source community provides. Along with his open source accomplishments, Bert is an entrepreneur who has worked with various start-ups. He continues to look for the next challenge at every turn to not only hone his craft, but also continue learning about new ideas and technologies and how to apply them in the best manner.
Apart from technology, he enjoys building things, taking things apart, and traveling. He has visited amazing places and has taken in various cultures around the world, and he continues to marvel at human ingenuity and the beauty the world provides.
He can be reached at <bertjw@regeer.org>.
George C. Guvernator V (Quint) studies computer science and linguistics at the College of William and Mary in Virginia. He is due to receive his BS in both fields in 2017. He has worked with the University of Colorado, Colorado Springs, where he researched machine learning in technical design. He is currently developing a study with the William and Mary makerspace to advance adaptive and assistive technology using augmented reality audio. Quint works as a web developer with the Institute for the Theory and Practice of International Relations, designs sound and music for short films and games, and edits the William and Mary student newspaper. Apart from his studies, Quint enjoys hiking, open source, cooking, and making music.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can