From 54e971a613b6a023fdb611ddd022b92df5275d6a Mon Sep 17 00:00:00 2001 From: Nathan Miller Date: Fri, 11 Aug 2023 09:58:46 -0700 Subject: [PATCH] Update copy-ssh-public-key.md (#25911) Co-authored-by: Steve Guntrip Co-authored-by: Grace Park --- .../adding-a-new-ssh-key-to-your-github-account.md | 3 +++ data/reusables/gpg/copy-ssh-public-key.md | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/content/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account.md b/content/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account.md index 35ac9847ea2c..989465e64643 100644 --- a/content/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account.md +++ b/content/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account.md @@ -39,8 +39,11 @@ After adding a new SSH authentication key to your account on {% ifversion ghae % {% webui %} {% data reusables.gpg.copy-ssh-public-key %} + {% data reusables.user-settings.access_settings %} + {% data reusables.user-settings.ssh %} + 1. Click **New SSH key** or **Add SSH key**. 1. In the "Title" field, add a descriptive label for the new key. For example, if you're using a personal laptop, you might call this key "Personal laptop". {% ifversion ssh-commit-verification %} diff --git a/data/reusables/gpg/copy-ssh-public-key.md b/data/reusables/gpg/copy-ssh-public-key.md index d592fbef5fe8..4d760b846a9f 100644 --- a/data/reusables/gpg/copy-ssh-public-key.md +++ b/data/reusables/gpg/copy-ssh-public-key.md @@ -21,11 +21,19 @@ # Copies the contents of the id_{% ifversion ghae %}rsa{% else %}ed25519{% endif %}.pub file to your clipboard ``` - {% tip %} + {% note %} - **Tip:** With Windows Subsystem for Linux (WSL), you can use `clip.exe`. Otherwise if `clip` isn't working, you can locate the hidden `.ssh` folder, open the file in your favorite text editor, and copy it to your clipboard. + **Notes:** - {% endtip %} + - With Windows Subsystem for Linux (WSL), you can use `clip.exe`. Otherwise if `clip` isn't working, you can locate the hidden `.ssh` folder, open the file in your favorite text editor, and copy it to your clipboard. + - On newer versions of Windows that use the Windows Terminal, or anywhere else that uses the PowerShell command line, you may receive a `ParseError` stating that `The '<' operator is reserved for future use.` In this case, the following alternative `clip` command should be used: + + ```shell + $ cat ~/.ssh/id_{% ifversion ghae %}rsa{% else %}ed25519{% endif %}.pub | clip + # Copies the contents of the id_{% ifversion ghae %}rsa{% else %}ed25519{% endif %}.pub file to your clipboard + ``` + + {% endnote %} {% endwindows %} {% linux %}