From b3a26717cd38240f4c8d1fe045a1b68a1e78a8d6 Mon Sep 17 00:00:00 2001 From: nopeitsnothing Date: Fri, 13 Oct 2023 23:28:20 -0400 Subject: [PATCH] Improve SSH commit signing instructions (#2265) Signed-off-by: Jonah Aragon --- docs/meta/git-recommendations.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/meta/git-recommendations.md b/docs/meta/git-recommendations.md index f3c0e976..48cbf937 100644 --- a/docs/meta/git-recommendations.md +++ b/docs/meta/git-recommendations.md @@ -13,14 +13,9 @@ You can use an existing SSH key for signing, or [create a new one](https://docs. git config --global gpg.format ssh git config --global tag.gpgSign true ``` -2. Copy your SSH public key to your clipboard, for example: +2. Set your SSH key for signing in Git with the following command, substituting `/PATH/TO/.SSH/KEY.PUB` with the path to the public key you'd like to use, e.g. `/home/user/.ssh/id_ed25519.pub`: ``` - pbcopy < ~/.ssh/id_ed25519.pub - # Copies the contents of the id_ed25519.pub file to your clipboard - ``` -3. Set your SSH key for signing in Git with the following command, replacing the last string in quotes with the public key in your clipboard: - ``` - git config --global user.signingkey 'ssh-ed25519 AAAAC3(...) user@example.com' + git config --global user.signingkey /PATH/TO/.SSH/KEY.PUB ``` Ensure you [add your SSH key to your GitHub account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account#adding-a-new-ssh-key-to-your-account) **as a Signing Key** (as opposed to or in addition to as an Authentication Key).