|
61 | 61 | git config --global tag.gpgsign true |
62 | 62 | ``` |
63 | 63 |
|
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 | + ``` |
67 | 78 |
|
68 | 79 | ### Windows/WSL |
69 | 80 |
|
|
134 | 145 | git config --global tag.gpgsign true |
135 | 146 | ``` |
136 | 147 |
|
137 | | -1. And finally, make it avalable within WSL: |
| 148 | +1. Now make it avalable within WSL: |
138 | 149 |
|
139 | 150 | 1. Within Ubuntu: |
140 | 151 |
|
|
156 | 167 | git config --global tag.gpgsign true |
157 | 168 | ``` |
158 | 169 |
|
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 | + ``` |
160 | 184 |
|
161 | 185 | ## From Pipelines |
162 | 186 |
|
@@ -212,7 +236,7 @@ if [[ ${BOT_SSH_KEY} != "None" ]]; then |
212 | 236 | echo "StrictHostKeyChecking yes" >> ~/.ssh/config |
213 | 237 | echo "UserKnownHostsFile=~/.ssh/known_hosts" >> ~/.ssh/config |
214 | 238 | echo "${BOT_SSH_KEY}" > ~/.ssh/ssh_key |
215 | | - echo -e "\n\n" >> ~/.ssh/ssh_key |
| 239 | + echo -e "\n\n" >> ~/.ssh/ssh_key |
216 | 240 | chmod 600 ~/.ssh/ssh_key |
217 | 241 | eval "$(ssh-agent -s)" |
218 | 242 | ssh-add ~/.ssh/ssh_key |
|
0 commit comments