How to add ssh key to gitlab
- George Apostolov
How to add ssh key to gitlab: step-by-step guide
On your Gitlab account select your avatar and click "Preferences."
Then choose "SSH Keys."
Open Command Prompt and run the command "
ssh-keygen -t rsa." You will be given instructions on where the SSH key will be saved.Enter a passphrase in the Command Prompt to proceed, then follow the subsequent instructions.
Find the SSH key, open it on Notepad, and copy it.
Paste the SSH key in the space provided and click "Add key."
Everything is set, this is now the new SSH key you have generated.
Quick answer: To add an SSH key to GitLab, select your avatar, click Preferences, and choose SSH Keys. Next, generate the key using Command Prompt, enter a passphrase, and follow the instructions. Finally, open the key in Notepad, copy it, paste it into GitLab, and click Add key.
About this GitLab tutorial
Secure your GitLab account by generating and adding a new SSH key through your preferences settings and Command Prompt. This guide shows how to add ssh key to gitlab in 7 steps, starting with "On your Gitlab account select your avatar and click 'Preferences'" and finishing with "Everything is set, this is now the new SSH key you have generated". The interactive demo above is a click-through copy of the real GitLab interface, so you can rehearse each step before doing it in your own account.
Frequently asked questions
How many steps does it take to add ssh key to gitlab?
7 steps. Each one is listed in order above, and the demo highlights exactly where to click.
Can I try it without changing my own account?
Yes. Clicking through the demo doesn't touch your GitLab data or settings. Once you know the flow, repeat it in your own workspace.
This tutorial is filed under GitLab. Related guides: How to Change Branch Name in Gitlab, How to Check GitLab Version and How to clone gitlab repository. Last reviewed 05 Oct 2026.
Create your first interactive demo in minutes
No credit card required • Start building today





