Connecting to GitLab with SSH

1) Checking for existing SSH keys

$ ls -al ~/.ssh
# Lists the files in your .ssh directory, if they exist
  • id_rsa.pub
  • id_ecdsa.pub
  • id_ed25519.pub

2) Generating a new SSH key and adding it to the ssh-agent

$ ssh-keygen -t ed25519 -C "your_email@example.com"
> Generating public/private ed25519 key pair.
> Enter a file in which to save the key (/home/you/.ssh/id_ed25519): [Press enter]

3) Adding a new SSH key to your GitLab account

$ sudo apt-get install xclip
# Downloads and installs xclip. If you don't have `apt-get`, you might need to use another installer (like `yum`)
$ xclip -selection clipboard < ~/.ssh/id_ed25519.pub
# Copies the contents of the id_ed25519.pub file to your clipboard

--

--

--

Software developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Why I Gave Logseq A Try

HFT-like Trading Algorithm in 300 Lines of Code You Can Run Now

Enabling Windows Authentication — Sitecore 9.2

CloudSEK CTF Challenge #3 WriteUp

Use cases of asset issuer flags in Stellar

Dynamic Ad Insertion in Linear and VOD OTT Streams

Basic TCP analysis with Wireshark

PancakeSwap Listing and Turbulence

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Amit Joshi

Amit Joshi

Software developer

More from Medium

How to automatically detect issues in your YAML file with Circle CI

How to Configure OpenVPN for Oracle Cloud Infrastructure

Get started with OpenSearch — The really quick guide.

The idea behind Docker and Linux containers