Improve 'Add an SSH key' page
What does this MR do and why?
The main goal of this MR is to clarify and simplify /-/profile/keys
page.
I changed the sentence from "To add an SSH key you need to generate one or use an existing key." to "Before you can add an SSH key you need to generate it.". I want users to see the beginning of this doc to get familiar with the base information of this guide. Users would be able to scroll and find the info they need - 'generate new SSH key', or 'add existing key'.
I removed "Paste your public SSH key, which is usually contained in the file '~/.ssh/id_ed25519.pub' or '~/.ssh/id_rsa.pub' and begins with 'ssh-ed25519' or 'ssh-rsa'. Do not paste your private SSH key, as that can compromise your identity." sentence. It is covered by the guide and keeping this doesn't encourage users to follow the link to the guide.
Moreover, this might cause some confusion to users since this sentence is outdated - Gitlab supports some additional types of ssh keys, some types of ssh keys can be restricted for GitLab instance by admin(see Screen recording), and we are about to support 2 additional SSH keys. Better to keep this information in the doc only.
What this MR suggests is to print the list of allowed on GitLab instance ssh key types in the placeholder of the field: "Begins with 'ssh-rsa', 'ssh-dss', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', or 'ssh-ed25519'". Whenever admin allows or restricts some type of ssh key, that would be reflected by this sentence. This would let users know what type of ssh key they need and implicitly highlight that the public key has to be pasted.
Screenshots
Before | After |
---|---|
![]() |
![]() |
Screen recording
simplescreenrecorder-2021-12-29_16.58.32
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.