Recognise when a user is trying to validate a private SSH key
Problem
User repeatedly pastes his private key rather than his public key into the SSH key field (https://gitlab.com/profile/keys). He doesn't understand why he is receiving an error message.
This problem was identified as part of the following research study: ux-research#53 (closed)
To do
- Recognise when a user has accidentally copied and pasted their private SSH key instead of their public SSH key. Inform them with a clear input field validation error message.
- Update current copy via following changes/additions on the SSH keys settings page
New wording for labels, descriptions, placeholders
- Block description
Is | Suggestion |
---|---|
Before you can add an SSH key you need to generate one or use an existing key. |
To add an SSH key you need to generate one or use an existing key. |
- New "Key" description
Is | Suggestion |
---|---|
n/a | Paste your public SSH key, which is usually contained in the file '~/.ssh/id_rsa.pub' and begins with 'ssh-rsa'. Don't use your private SSH key. |
- "Key" placeholder
Is | Suggestion |
---|---|
Don't paste the private part of the SSH key. Paste the public part, which is usually contained in the file '~/.ssh/id_rsa.pub' and begins with 'ssh-rsa'. |
Typically starts with "ssh-rsa …" (?) |
- New "Title" description
Is | Suggestion |
---|---|
n/a | Name your individual key via a title |
- "Title" placeholder
Is | Suggestion |
---|---|
empty | e.g. My MacBook key |
Proposed design
Add key form | Form alert |
---|---|
User flow when private key is entered
- User pastes the key
- User fills in the Title input field ('Add key' button becomes enabled)
- User clicks on 'Add key'
- Alert shows up
- User checks the key, deletes it from 'Key' text area and pastes in the correct public key
- User clicks on 'Yes, it's not private'
- The key is added
Changes introduced
- Moved long placeholder text from 'Key' text area outside of it, below the 'Key' label as paragraph text.
- Changed the 'Key' text area placeholder to a shorter and helpful one
- Added an example placeholder text to the 'Title' input field
- Added a warning alert that shows up when we think the key might be private.
Edited by Matej Latin