Skip to content

Commit c073060

Browse files
authored
Improve commit signing guide with clearer steps
1 parent 88aed16 commit c073060

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

practices/guides/commit-signing.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,20 @@
6161
git config --global tag.gpgsign true
6262
```
6363
64-
> The first time you commit you will be prompted to add the GPG key passphrase to the macOS Keychain. Thereafter signing will happen seamlessly without prompts.
65-
>
66-
> Most of the published solutions for this don't work because *brew* seems to have moved the default folder for binaries, plus many guides contain obsolete settings for *gpg-agent*.
64+
1. Test it works:
65+
66+
1. Create a temporary branch of your favourite repository.
67+
1. Make an inconsequential whitesace change.
68+
1. Commit the change.
69+
1. You will be prompted for your GPG key passphrase - optionally select to add it to the macOS Keychain.
70+
1. Check the latest commit shows a successful signing:
71+
72+
```bash
73+
$ git log --show-signature -1
74+
...
75+
gpg: Good signature from "<github_handle> <<my_email_address>>" [ultimate]
76+
...
77+
```
6778
6879
### Windows/WSL
6980
@@ -134,7 +145,7 @@
134145
git config --global tag.gpgsign true
135146
```
136147

137-
1. And finally, make it avalable within WSL:
148+
1. Now make it avalable within WSL:
138149

139150
1. Within Ubuntu:
140151

@@ -156,7 +167,20 @@
156167
git config --global tag.gpgsign true
157168
```
158169

159-
> When you commit, you'll now be prompted to enter the GPG key passphrase into a Pinentry window.
170+
1. Test it works:
171+
172+
1. Create a temporary branch of your favourite repository.
173+
1. Make an inconsequential whitesace change.
174+
1. Commit the change.
175+
1. You will be prompted for your GPG key passphrase.
176+
1. Check the latest commit shows a successful signing:
177+
178+
```bash
179+
$ git log --show-signature -1
180+
...
181+
gpg: Good signature from "<github_handle> <<my_email_address>>" [ultimate]
182+
...
183+
```
160184

161185
## From Pipelines
162186

@@ -212,7 +236,7 @@ if [[ ${BOT_SSH_KEY} != "None" ]]; then
212236
echo "StrictHostKeyChecking yes" >> ~/.ssh/config
213237
echo "UserKnownHostsFile=~/.ssh/known_hosts" >> ~/.ssh/config
214238
echo "${BOT_SSH_KEY}" > ~/.ssh/ssh_key
215-
echo -e "\n\n" >> ~/.ssh/ssh_key
239+
echo -e "\n\n" >> ~/.ssh/ssh_key
216240
chmod 600 ~/.ssh/ssh_key
217241
eval "$(ssh-agent -s)"
218242
ssh-add ~/.ssh/ssh_key

0 commit comments

Comments
 (0)