aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar drduh <github@duh.to> 2025-05-06 23:55:03 +0000
committerGravatar GitHub <noreply@github.com> 2025-05-06 23:55:03 +0000
commita7b9a972c5f29b7bea6475a9a24aab825104cf94 (patch)
tree67b4227fdb20cbcd0f46448247b70e2995972b7d
parentb822d411aa101adb298429e6dcf04110122aba15 (diff)
parent0c30e143bf41f5bbbe295abdd0cb5bad9f5da9f6 (diff)
downloadYubiKey-Guide-a7b9a972c5f29b7bea6475a9a24aab825104cf94.tar.gz
YubiKey-Guide-a7b9a972c5f29b7bea6475a9a24aab825104cf94.tar.zst
YubiKey-Guide-a7b9a972c5f29b7bea6475a9a24aab825104cf94.zip
Merge pull request #497 from mattborja/readme-gpgsign
Update instructions for commit signing
-rw-r--r--README.md23
1 files changed, 20 insertions, 3 deletions
diff --git a/README.md b/README.md
index 0f19ad8..08af0dd 100644
--- a/README.md
+++ b/README.md
@@ -1663,15 +1663,32 @@ The path must be set according to `gpgconf --list-dirs agent-ssh-socket` on *rem
YubiKey can be used to sign commits and tags, and authenticate SSH to GitHub when configured in [Settings](https://github.com/settings/keys).
-Configure a signing key:
+Configure the signing key:
```console
git config --global user.signingkey $KEYID
```
-Configure the `user.email` option to match the email address associated with the PGP identity.
+Alternatively, if you are using the aforementioned `IdentityFile` (SSH key) for signing:
-To sign commits or tags, use the `-S` option.
+```console
+git config --global gpg.format ssh
+git config --global user.signingkey ~/.ssh/id_rsa_yubikey.pub
+```
+
+Configure the `user.name` and `user.email` option to match the email address associated with the PGP identity:
+
+```console
+git config --global user.name 'YubiKey User'
+git config --global user.email yubikey@example
+```
+
+To sign commits or tags, use the `-S` option, or consider enabling commit and tag signing by default:
+
+```console
+git config --global commit.gpgsign true
+git config --global tag.gpgSign true
+```
**Windows**