Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Gitlab Cookbook

You're reading from   Gitlab Cookbook Over 60 hands-on recipes to efficiently self-host your own Git repository using GitLab

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781783986842
Length 172 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Jeroen van Baarsen Jeroen van Baarsen
Author Profile Icon Jeroen van Baarsen
Jeroen van Baarsen
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Introduction and Installation 2. Explaining Git FREE CHAPTER 3. Managing Users, Groups, and Permissions 4. Issue Tracker and Wiki 5. Maintaining Your GitLab Instance 6. Webhooks, External Services, and the API 7. Using LDAP and OmniAuth Providers 8. GitLab CI A. Tips and Tricks Index

Getting your private token for the API


GitLab has a powerful API system; almost all the actions you can perform in the web interface can also be done via the API. In order to use the API, you need to get your private token from GitLab. In this recipe, we will see where you can find your token and how you can regenerate an existing token.

How to do it…

In the following steps, we will create our private token for the API:

  1. Log in to your GitLab instance.

  2. Click on Profile settings.

  3. Click on Account.

  4. Here, you can find your private token:

  5. If you need to reset your token because it has been compromised, you can do so by clicking on the Reset button.

  6. GitLab will now generate a new token for you.

How it works…

The private token is used for all the API requests; it's a replacement for the username/password combination. You have to make sure that your private token is kept secure; the same way you have to make sure your username/password is secure.

When you have the feeling your token has been compromised, you...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime