Skip to content

Commit ab39225

Browse files
Add example for outputting a gpg public key (#13740)
* Add example for outputting a gpg public key * Update checking-for-existing-gpg-keys.md * Delete display-existing-gpg-public-key.md Co-authored-by: hubwriter <hubwriter@github.com>
1 parent c840a72 commit ab39225

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

content/authentication/managing-commit-signature-verification/checking-for-existing-gpg-keys.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ shortTitle: Existing GPG keys
2727
{% data reusables.gpg.list-keys-with-note %}
2828
3. Check the command output to see if you have a GPG key pair.
2929
* If there are no GPG key pairs or you don't want to use any that are available for signing commits and tags, then [generate a new GPG key](/articles/generating-a-new-gpg-key).
30-
* If there's an existing GPG key pair and you want to use it to sign commits and tags, then [add your GPG key to your GitHub account](/articles/adding-a-new-gpg-key-to-your-github-account).
30+
* If there's an existing GPG key pair and you want to use it to sign commits and tags, you can display the public key using the following command, substituting in the GPG key ID you'd like to use. In this example, the GPG key ID is `3AA5C34371567BD2`:
31+
```shell
32+
$ gpg --armor --export <em>3AA5C34371567BD2</em>
33+
# Prints the GPG key ID, in ASCII armor format
34+
```
35+
You can then [add your GPG key to your GitHub account](/articles/adding-a-new-gpg-key-to-your-github-account).
3136

3237
## Further reading
3338

0 commit comments

Comments
 (0)