From f6329a5a449d5c4e0c273b1c6d73d001d4202218 Mon Sep 17 00:00:00 2001 From: Michelle Noorali Date: Fri, 5 Nov 2021 14:00:20 -0400 Subject: [PATCH 1/3] Update adding-a-new-ssh-key-to-your-github-account.md The GitHub CLI does not allow you to add an ssh key unless you are authenticated with your GitHub account. The `gh auth login` command not only authenticates you but also gives prompts to add your ssh key to your account. This PR amends the GitHub CLI portion with the `gh auth login` path. This may be useful to someone coming to this page for the first time who has not already installed the gh CLI and will do so as part of this flow and will then need to authenticate. --- .../adding-a-new-ssh-key-to-your-github-account.md | 7 +++++++ 1 file changed, 7 insertions(+) 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 b06c040b70e0..7d4a9ab7c1da 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 @@ -135,6 +135,13 @@ After adding a new SSH key to your account on {% ifversion ghae %}{% data variab {% data reusables.cli.cli-learn-more %} +You'll need to authenticate the GitHub CLI with your GitHub account before being able to add an ssh-key. If you have not already done so, use the following command and follow the prompts to authenticate and add your ssh public key to your GitHub account. + +```shell +gh auth login +``` + +If you are already authenticated, use the commands below. To add an SSH key to your GitHub account, use the `ssh-key add` subcommand, specifying your public key. ```shell From b24e9a92246b797c23b6c84196aca6d6da539696 Mon Sep 17 00:00:00 2001 From: Laura Coursen Date: Fri, 12 Nov 2021 14:55:49 -0600 Subject: [PATCH 2/3] Add :nail_care: --- .../adding-a-new-ssh-key-to-your-github-account.md | 8 +------- 1 file changed, 1 insertion(+), 7 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 7d4a9ab7c1da..2f583e90d2b3 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 @@ -135,13 +135,7 @@ After adding a new SSH key to your account on {% ifversion ghae %}{% data variab {% data reusables.cli.cli-learn-more %} -You'll need to authenticate the GitHub CLI with your GitHub account before being able to add an ssh-key. If you have not already done so, use the following command and follow the prompts to authenticate and add your ssh public key to your GitHub account. - -```shell -gh auth login -``` - -If you are already authenticated, use the commands below. +Before you can use the {% data variables.product.prodname_cli %} to add an SSH key to your account, you must authenticate to the {% data variables.product.prodname_cli %}. For more information, see [`gh auth login`](https://cli.github.com/manual/gh_auth_login) in the {% data variables.product.prodname_cli %} documentation. To add an SSH key to your GitHub account, use the `ssh-key add` subcommand, specifying your public key. ```shell From 1550bd87fa7b0ce4f22bd36d4d8c50b8a3c3f72d Mon Sep 17 00:00:00 2001 From: Laura Coursen Date: Fri, 12 Nov 2021 15:04:52 -0600 Subject: [PATCH 3/3] Add newline --- .../adding-a-new-ssh-key-to-your-github-account.md | 1 + 1 file changed, 1 insertion(+) 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 2f583e90d2b3..d27559c1120e 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 @@ -136,6 +136,7 @@ After adding a new SSH key to your account on {% ifversion ghae %}{% data variab {% data reusables.cli.cli-learn-more %} Before you can use the {% data variables.product.prodname_cli %} to add an SSH key to your account, you must authenticate to the {% data variables.product.prodname_cli %}. For more information, see [`gh auth login`](https://cli.github.com/manual/gh_auth_login) in the {% data variables.product.prodname_cli %} documentation. + To add an SSH key to your GitHub account, use the `ssh-key add` subcommand, specifying your public key. ```shell