Connecting to GitLab with SSH

1) Checking for existing SSH keys

$ ls -al ~/.ssh
# Lists the files in your .ssh directory, if they exist

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

$ ssh-keygen -t ed25519 -C ""
> 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/
# Copies the contents of the file to your clipboard




Software developer

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

Recommended from Medium


5 Advantages with Supplier Relationship Management Software

5 Killer Automation Scripts in Python — Part-2

MuleSoft Deployment Strategies & their Differences (RTF vs Hybrid vs CloudHub)

Is serverless worth it, and what option to go with?

Image of Lolo Code’s visual programming flow. Taken from the Lolo Code Documentation.

Python: .format(), f-string/formatted string literals

AWS Workshops — Ongoing list

GraphQL FAQs

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 find files in Bash?

How to add a watermark to the video. Complete guide.

How to install Chocolatey in windows- DevOps Champ

Change Git Commits DateTime (All Supported formats)