Skip to content

Commit 389632d

Browse files
authored
Merge branch 'main' into repo-sync
2 parents 91f9349 + ab39225 commit 389632d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-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

content/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ If you have multiple GPG keys, you need to tell Git which one to use.
4444
$ if [ -r ~/.bash_profile ]; then echo 'export GPG_TTY=$(tty)' >> ~/.bash_profile; \
4545
else echo 'export GPG_TTY=$(tty)' >> ~/.profile; fi
4646
```
47+
1. Optionally, to prompt you to enter a PIN or passphrase when required, install `pinentry-mac`. For example, using [Homebrew](https://brew.sh/):
48+
```shell
49+
$ brew install pinentry-mac
50+
$ echo "pinentry-program $(which pinentry-mac)" >> ~/.gnupg/gpg-agent.conf
51+
$ killall gpg-agent
52+
```
4753

4854
{% data reusables.gpg.x-509-key %}
4955

0 commit comments

Comments
 (0)