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

Adding your SSH key to GitLab

In order for GitLab to know who we are and check whether we are authorized to commit certain code, we use our SSH key. The combination of the public key and the private key can tell GitLab that we are authorized, and GitLab will allow the operation to be performed.

How to do it…

To set up your SSH key, perform the following steps:

  1. Open GitLab and go to your account settings.
    How to do it…
  2. Click on SSH.
  3. Click on Add SSH Key.
    How to do it…
  4. To get information about your SSH key, enter the following command in your terminal. If you're using Windows, go to step 7:
    $ cat ~/.ssh/id_rsa.pub
    
  5. You should copy the entire content of the output in step 4, as shown in the following screenshot:
    How to do it…
  6. If you're not using Windows, you can move to step 11.
  7. Open the Windows explorer and move to C:\Users\your_username\.ssh.
  8. Right-click on id_rsa.pub and click on Open.
  9. When asked for the program you want to use, select Notepad.
  10. Select the entire content of the file that contains the SSH key.
    How to do it…
  11. We now paste the...
You have been reading a chapter from
Gitlab Cookbook
Published in: Dec 2014
Publisher:
ISBN-13: 9781783986842
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