From 38dbaab89c3f8063518d6fac8adfad9d622e124a Mon Sep 17 00:00:00 2001 From: Rob Bos Date: Thu, 11 Aug 2022 09:20:21 +0200 Subject: [PATCH 01/10] Add the copy button to the code blocks --- .../generating-a-new-gpg-key.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/authentication/managing-commit-signature-verification/generating-a-new-gpg-key.md b/content/authentication/managing-commit-signature-verification/generating-a-new-gpg-key.md index e1c8492c46..dbf8a91281 100644 --- a/content/authentication/managing-commit-signature-verification/generating-a-new-gpg-key.md +++ b/content/authentication/managing-commit-signature-verification/generating-a-new-gpg-key.md @@ -28,11 +28,11 @@ topics: {% data reusables.command_line.open_the_multi_os_terminal %} 3. Generate a GPG key pair. Since there are multiple versions of GPG, you may need to consult the relevant [_man page_](https://en.wikipedia.org/wiki/Man_page) to find the appropriate key generation command. Your key must use RSA. - If you are on version 2.1.17 or greater, paste the text below to generate a GPG key pair. - ```shell + ```shell{:copy} $ gpg --full-generate-key ``` - If you are not on version 2.1.17 or greater, the `gpg --full-generate-key` command doesn't work. Paste the text below and skip to step 6. - ```shell + ```shell{:copy} $ gpg --default-new-key-algo rsa4096 --gen-key ``` 4. At the prompt, specify the kind of key you want, or press `Enter` to accept the default. @@ -51,7 +51,7 @@ topics: {% data reusables.gpg.list-keys-with-note %} {% data reusables.gpg.copy-gpg-key-id %} 10. Paste the text below, substituting in the GPG key ID you'd like to use. In this example, the GPG key ID is `3AA5C34371567BD2`: - ```shell + ```shell{:copy} $ gpg --armor --export 3AA5C34371567BD2 # Prints the GPG key ID, in ASCII armor format ``` From 825375555841a625a9f58bf754b5843e249e2ab3 Mon Sep 17 00:00:00 2001 From: Rob Bos Date: Thu, 11 Aug 2022 09:23:27 +0200 Subject: [PATCH 02/10] Add copy button --- data/reusables/gpg/list-keys-with-note.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/reusables/gpg/list-keys-with-note.md b/data/reusables/gpg/list-keys-with-note.md index 3dfe6910ca..b4f3dec080 100644 --- a/data/reusables/gpg/list-keys-with-note.md +++ b/data/reusables/gpg/list-keys-with-note.md @@ -1,6 +1,6 @@ 1. Use the `gpg --list-secret-keys --keyid-format=long` command to list the long form of the GPG keys for which you have both a public and private key. A private key is required for signing commits or tags. - ```shell + ```shell{:copy} $ gpg --list-secret-keys --keyid-format=long ``` {% note %} From 89c856a8c9a3a985cda126e3a8abd891420cc1d9 Mon Sep 17 00:00:00 2001 From: Rob Bos Date: Thu, 11 Aug 2022 09:24:15 +0200 Subject: [PATCH 03/10] Add copy button --- data/reusables/gpg/copy-gpg-key-id.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/reusables/gpg/copy-gpg-key-id.md b/data/reusables/gpg/copy-gpg-key-id.md index 944dd0f138..326f685f78 100644 --- a/data/reusables/gpg/copy-gpg-key-id.md +++ b/data/reusables/gpg/copy-gpg-key-id.md @@ -1,5 +1,5 @@ 1. From the list of GPG keys, copy the long form of the GPG key ID you'd like to use. In this example, the GPG key ID is `3AA5C34371567BD2`: - ```shell + ```shell{:copy} $ gpg --list-secret-keys --keyid-format=long /Users/hubot/.gnupg/secring.gpg ------------------------------------ From f287061eaf16202e3d984a574414a9ed0fc22eb4 Mon Sep 17 00:00:00 2001 From: Rob Bos Date: Wed, 17 Aug 2022 20:04:42 +0200 Subject: [PATCH 04/10] Change from PR comment https://github.com/github/docs/pull/19676#issuecomment-1217216934 --- data/reusables/gpg/list-keys-with-note.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/reusables/gpg/list-keys-with-note.md b/data/reusables/gpg/list-keys-with-note.md index b4f3dec080..e30bf0ff55 100644 --- a/data/reusables/gpg/list-keys-with-note.md +++ b/data/reusables/gpg/list-keys-with-note.md @@ -1,6 +1,6 @@ 1. Use the `gpg --list-secret-keys --keyid-format=long` command to list the long form of the GPG keys for which you have both a public and private key. A private key is required for signing commits or tags. - ```shell{:copy} + ```shell{:copy} $ gpg --list-secret-keys --keyid-format=long ``` {% note %} From 9bced9e997269b3dfdb6220af496bb45606728c9 Mon Sep 17 00:00:00 2001 From: Rob Bos Date: Fri, 19 Aug 2022 21:39:33 +0200 Subject: [PATCH 05/10] Remove extra space --- data/reusables/gpg/list-keys-with-note.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/reusables/gpg/list-keys-with-note.md b/data/reusables/gpg/list-keys-with-note.md index e30bf0ff55..df17d94322 100644 --- a/data/reusables/gpg/list-keys-with-note.md +++ b/data/reusables/gpg/list-keys-with-note.md @@ -1,6 +1,6 @@ 1. Use the `gpg --list-secret-keys --keyid-format=long` command to list the long form of the GPG keys for which you have both a public and private key. A private key is required for signing commits or tags. - ```shell{:copy} +```shell{:copy} $ gpg --list-secret-keys --keyid-format=long ``` {% note %} From a305da14f8c3fc8faab498388c0294ceaa065af4 Mon Sep 17 00:00:00 2001 From: Rob Bos Date: Fri, 19 Aug 2022 21:40:25 +0200 Subject: [PATCH 06/10] Remove extra space --- .../generating-a-new-gpg-key.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/authentication/managing-commit-signature-verification/generating-a-new-gpg-key.md b/content/authentication/managing-commit-signature-verification/generating-a-new-gpg-key.md index dbf8a91281..a7b0dcab00 100644 --- a/content/authentication/managing-commit-signature-verification/generating-a-new-gpg-key.md +++ b/content/authentication/managing-commit-signature-verification/generating-a-new-gpg-key.md @@ -51,10 +51,10 @@ topics: {% data reusables.gpg.list-keys-with-note %} {% data reusables.gpg.copy-gpg-key-id %} 10. Paste the text below, substituting in the GPG key ID you'd like to use. In this example, the GPG key ID is `3AA5C34371567BD2`: - ```shell{:copy} - $ gpg --armor --export 3AA5C34371567BD2 - # Prints the GPG key ID, in ASCII armor format - ``` + ```shell{:copy} + $ gpg --armor --export 3AA5C34371567BD2 + # Prints the GPG key ID, in ASCII armor format + ``` 11. Copy your GPG key, beginning with `-----BEGIN PGP PUBLIC KEY BLOCK-----` and ending with `-----END PGP PUBLIC KEY BLOCK-----`. 12. [Add the GPG key to your GitHub account](/articles/adding-a-gpg-key-to-your-github-account). From ea30ccae0861d081d7a73bb34465b6b8335b9e04 Mon Sep 17 00:00:00 2001 From: Rob Bos Date: Fri, 19 Aug 2022 21:41:00 +0200 Subject: [PATCH 07/10] Remove extra space --- data/reusables/gpg/copy-gpg-key-id.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/reusables/gpg/copy-gpg-key-id.md b/data/reusables/gpg/copy-gpg-key-id.md index 326f685f78..e160fb4226 100644 --- a/data/reusables/gpg/copy-gpg-key-id.md +++ b/data/reusables/gpg/copy-gpg-key-id.md @@ -1,9 +1,9 @@ 1. From the list of GPG keys, copy the long form of the GPG key ID you'd like to use. In this example, the GPG key ID is `3AA5C34371567BD2`: - ```shell{:copy} + ```shell{:copy} $ gpg --list-secret-keys --keyid-format=long /Users/hubot/.gnupg/secring.gpg ------------------------------------ sec 4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10] uid Hubot ssb 4096R/42B317FD4BA89E7A 2016-03-10 - ``` + ``` From e65a56a42c2450e34df46ca2bd24c814cf3c74f8 Mon Sep 17 00:00:00 2001 From: Rob Bos Date: Wed, 24 Aug 2022 19:12:58 +0200 Subject: [PATCH 08/10] Update data/reusables/gpg/copy-gpg-key-id.md Co-authored-by: Courtney Wilson <77312589+cmwilson21@users.noreply.github.com> --- data/reusables/gpg/copy-gpg-key-id.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/reusables/gpg/copy-gpg-key-id.md b/data/reusables/gpg/copy-gpg-key-id.md index e160fb4226..327fc59509 100644 --- a/data/reusables/gpg/copy-gpg-key-id.md +++ b/data/reusables/gpg/copy-gpg-key-id.md @@ -1,5 +1,5 @@ 1. From the list of GPG keys, copy the long form of the GPG key ID you'd like to use. In this example, the GPG key ID is `3AA5C34371567BD2`: - ```shell{:copy} + ```shell{:copy} $ gpg --list-secret-keys --keyid-format=long /Users/hubot/.gnupg/secring.gpg ------------------------------------ From 66767bb54e589a6b8175ff34649921a122def7e0 Mon Sep 17 00:00:00 2001 From: Rob Bos Date: Wed, 24 Aug 2022 19:13:04 +0200 Subject: [PATCH 09/10] Update data/reusables/gpg/list-keys-with-note.md Co-authored-by: Courtney Wilson <77312589+cmwilson21@users.noreply.github.com> --- data/reusables/gpg/list-keys-with-note.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/reusables/gpg/list-keys-with-note.md b/data/reusables/gpg/list-keys-with-note.md index df17d94322..ff2a39a64d 100644 --- a/data/reusables/gpg/list-keys-with-note.md +++ b/data/reusables/gpg/list-keys-with-note.md @@ -1,6 +1,6 @@ 1. Use the `gpg --list-secret-keys --keyid-format=long` command to list the long form of the GPG keys for which you have both a public and private key. A private key is required for signing commits or tags. -```shell{:copy} + ```shell{:copy} $ gpg --list-secret-keys --keyid-format=long ``` {% note %} From 1352d33f36bf5a834355d9cba1c671e161ecebe4 Mon Sep 17 00:00:00 2001 From: Courtney Wilson <77312589+cmwilson21@users.noreply.github.com> Date: Fri, 26 Aug 2022 09:53:14 -0500 Subject: [PATCH 10/10] Update list-keys-with-note.md attempting space correction --- data/reusables/gpg/list-keys-with-note.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/data/reusables/gpg/list-keys-with-note.md b/data/reusables/gpg/list-keys-with-note.md index ff2a39a64d..ed154975cb 100644 --- a/data/reusables/gpg/list-keys-with-note.md +++ b/data/reusables/gpg/list-keys-with-note.md @@ -1,10 +1,11 @@ - 1. Use the `gpg --list-secret-keys --keyid-format=long` command to list the long form of the GPG keys for which you have both a public and private key. A private key is required for signing commits or tags. + ```shell{:copy} - $ gpg --list-secret-keys --keyid-format=long -``` - {% note %} + $ gpg --list-secret-keys --keyid-format=long + ``` + + {% note %} - **Note:** Some GPG installations on Linux may require you to use `gpg2 --list-keys --keyid-format LONG` to view a list of your existing keys instead. In this case you will also need to configure Git to use `gpg2` by running `git config --global gpg.program gpg2`. + **Note:** Some GPG installations on Linux may require you to use `gpg2 --list-keys --keyid-format LONG` to view a list of your existing keys instead. In this case you will also need to configure Git to use `gpg2` by running `git config --global gpg.program gpg2`. - {% endnote %} + {% endnote %}