Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
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 FREE CHAPTER 2. Explaining Git 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

Generating your SSH key on Unix-like systems


Generating an SSH key on Linux and OS X is easy; they come with a built-in tool to do this, called ssh-keygen.

How to do it…

In the following steps, we will create an SSH key for your Unix system:

  1. First, we are going to check whether you have any SSH keys present. Open your terminal and enter the following command:

    $ ls ~/.ssh
    
  2. If you have a file named id_rsa.pub or id_dsa.pub, you can skip this recipe.

  3. To generate a new SSH key, you need to open your terminal and enter the following command:

    $ ssh-keygen -t rsa -C "Comment for key"
    

    The comment can be anything you want; it makes it easier for you to see which key it is when you open the key file.

  4. Now, we get to the question of what you want to name your key. Just press Enter.

  5. You will be asked to enter a passphrase. Enter it, and be sure to choose a strong password.

    You should see the following screenshot:

Your SSH key is now generated.

How it works…

We just created our personal SSH key: one key is the id_rsa...

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 $19.99/month. Cancel anytime
Banner background image