File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -1663,15 +1663,32 @@ The path must be set according to `gpgconf --list-dirs agent-ssh-socket` on *rem
16631663
16641664YubiKey can be used to sign commits and tags, and authenticate SSH to GitHub when configured in [Settings](https://github.com/settings/keys).
16651665
1666- Configure a signing key:
1666+ Configure the signing key:
16671667
16681668` ` ` console
16691669git config --global user.signingkey $KEYID
16701670` ` `
16711671
1672- Configure the ` user.email ` option to match the email address associated with the PGP identity.
1672+ Alternatively, if you are using the aforementioned ` IdentityFile ` (SSH key) for signing:
16731673
1674- To sign commits or tags, use the ` -S` option.
1674+ ` ` ` console
1675+ git config --global gpg.format ssh
1676+ git config --global user.signingkey ~ /.ssh/id_rsa_yubikey.pub
1677+ ` ` `
1678+
1679+ Configure the ` user.name` and ` user.email` option to match the email address associated with the PGP identity:
1680+
1681+ ` ` ` console
1682+ git config --global user.name ' YubiKey User'
1683+ git config --global user.email yubikey@example
1684+ ` ` `
1685+
1686+ To sign commits or tags, use the ` -S` option, or consider enabling commit and tag signing by default:
1687+
1688+ ` ` ` console
1689+ git config --global commit.gpgsign true
1690+ git config --global tag.gpgSign true
1691+ ` ` `
16751692
16761693** Windows**
16771694
You can’t perform that action at this time.
0 commit comments