Commit ec5b802e authored by Luke Bennett's avatar Luke Bennett Committed by Phil Hughes

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

parent d07e16fa
...@@ -4,10 +4,12 @@ ...@@ -4,10 +4,12 @@
.form-group .form-group
= f.label :key, class: 'label-light' = 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 .form-group
= f.label :title, class: 'label-light' = 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 .prepend-top-default
= f.submit 'Add key', class: "btn btn-create" = f.submit 'Add key', class: "btn btn-create"
...@@ -11,10 +11,11 @@ ...@@ -11,10 +11,11 @@
%h5.prepend-top-0 %h5.prepend-top-0
Add an SSH key Add an SSH key
%p.profile-settings-content %p.profile-settings-content
Before you can add an SSH key you need to - generate_link_url = help_page_path("ssh/README", anchor: 'generating-a-new-ssh-key-pair')
= link_to "generate one", 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')
or use an - generate_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: generate_link_url }
= link_to "existing key.", help_page_path("ssh/README", anchor: 'locating-an-existing-ssh-key-pair') - 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' = render 'form'
%hr %hr
%h5 %h5
......
---
title: Update new SSH key page to improve copy
merge_request: 19994
author:
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment