Merge branch '46396-recognise-when-a-user-is-trying-to-validate-a-private-ssh-key-part-1' into 'master'

(Part 1) Resolve "Recognise when a user is trying to validate a private SSH key"

See merge request gitlab-org/gitlab-ce!19994
This commit is contained in:
Phil Hughes 2018-06-25 08:30:12 +00:00
commit 9490c37833
3 changed files with 14 additions and 6 deletions

View file

@ -4,10 +4,12 @@
.form-group
= f.label :key, class: 'label-light'
= f.text_area :key, class: "form-control", rows: 8, required: true, placeholder: "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'."
%p= _("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.")
= f.text_area :key, class: "form-control", rows: 8, required: true, placeholder: 'Typically starts with "ssh-rsa …"'
.form-group
= f.label :title, class: 'label-light'
= f.text_field :title, class: "form-control", required: true
= f.text_field :title, class: "form-control", required: true, placeholder: 'e.g. My MacBook key'
%p.form-text.text-muted= _('Name your individual key via a title')
.prepend-top-default
= f.submit 'Add key', class: "btn btn-create"

View file

@ -11,10 +11,11 @@
%h5.prepend-top-0
Add an SSH key
%p.profile-settings-content
Before you can add an SSH key you need to
= link_to "generate one", help_page_path("ssh/README", anchor: 'generating-a-new-ssh-key-pair')
or use an
= link_to "existing key.", help_page_path("ssh/README", anchor: 'locating-an-existing-ssh-key-pair')
- generate_link_url = help_page_path("ssh/README", anchor: 'generating-a-new-ssh-key-pair')
- existing_link_url = help_page_path("ssh/README", anchor: 'locating-an-existing-ssh-key-pair')
- generate_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: generate_link_url }
- existing_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: existing_link_url }
= _('To add an SSH key you need to %{generate_link_start}generate one%{link_end} or use an %{existing_link_start}existing key%{link_end}.').html_safe % { generate_link_start: generate_link_start, existing_link_start: existing_link_start, link_end: '</a>'.html_safe }
= render 'form'
%hr
%h5

View file

@ -0,0 +1,5 @@
---
title: Update new SSH key page to improve copy
merge_request: 19994
author:
type: other