Skip to main content

A new setup

· 2 min read
Abhishek Gowda
warning

I am assuming this is a new machine setup or a machine which is occasionally used and does not contain any previous setup. And for most part I will be talking about Linux machine

Setting up SSH key

Adding SSH key in gitlab

  1. Sign in to gitlab
  2. Click on your user profile. You should see a dropdown modal
  3. Click preference on it. You will be taken to the preference page of your profile
  4. Look for SSH keys on the left navigation. If left navigation is closed click on "Sidebar Navigation" button or press Ctrl+\. Navigation sidebar will open.
  5. You should now be in SSH keys page
  6. Locate Add new key button
  7. Click on it ☝️ (Add new key)
  8. In your machine

Navigate to user directory

cd ~

Locate .ssh directory, it is an hidden directory, navigate within it

cd ~/.ssh

Copy public key that is generated

cat <encrypted_file_name>.pub

copy the contents

  1. Past the copied key into key text area
  2. Pick a title so you could differentiate when and where the token is located
  3. Choose Usage type. I prefer to use the same token for Authenticating and signing, you could have different token setup
  4. Choose the duration of the key when it should be invalidated.

  • My suggestion/steps would get outdated, leaving gitlab ssh key reference link