|
45 | 45 | 1. Avoid adding a comment (this *may* prevent git from auto-selecting a key - see Troubleshooting section below) |
46 | 46 | 1. Define a passphrase for the key |
47 | 47 |
|
48 | | -1. Export the PGP PUBLIC KEY (to your clipboard): |
| 48 | +1. Test the key is visible and export the PGP PUBLIC KEY (to your clipboard): |
49 | 49 |
|
50 | 50 | ```bash |
51 | 51 | gpg -k # This should list the new key |
|
91 | 91 | 1. Avoid adding a comment (this *may* prevent git from auto-selecting a key - see Troubleshooting section below) |
92 | 92 | 1. Define a passphrase for the key |
93 | 93 |
|
94 | | -1. Export the PGP PUBLIC KEY (to your clipboard): |
| 94 | +1. Test the key is visible and export the PGP PUBLIC KEY (to your clipboard): |
95 | 95 |
|
96 | 96 | ```bash |
97 | 97 | gpg -k # This should list the new key |
|
125 | 125 | > **Ensure both `GnuPG` and `Kleopatra` are installed!** |
126 | 126 |
|
127 | 127 | 1. Open Kleopatra -> `Import` -> Select the `<GitHub handle>.pgp` file created in the first step |
128 | | - 1. In `cmd`, set your local git config to use GPG signing: |
| 128 | + 1. In `cmd`, test the key is visible and set your local git config to use GPG signing: |
129 | 129 |
|
130 | 130 | ```bash |
131 | 131 | gpg -k # This should list the new key |
|
147 | 147 |
|
148 | 148 | 1. Close and reopen your Ubuntu terminal |
149 | 149 |
|
150 | | - 1. Test the key is visible: |
| 150 | + 1. Test the key is visible and set your local git config to use GPG signing: |
151 | 151 |
|
152 | 152 | ```bash |
153 | 153 | gpg -k # This should list the new key |
| 154 | + git config --global user.email ${my_email_address} # same one used during key generation |
| 155 | + git config --global user.name ${my_username} |
| 156 | + git config --global user.signingkey ${key_id} |
| 157 | + git config --global commit.gpgsign true |
| 158 | + git config --global tag.gpgsign true |
154 | 159 | ``` |
155 | 160 |
|
156 | 161 | > When you commit, you'll now be prompted to enter the GPG key passphrase into a Pinentry window. |
|
0 commit comments