@@ -13,6 +13,8 @@ In Git, you may commit using any name and email address. However, Git supports s
13
13
14
14
By signing a commit, other users with your public key can verify the commit was created by the owner of that key. Users can also share their public key with their remote hosting service, such as GitHub, so that commits appear as verified on their website.
15
15
16
+ ***
17
+
16
18
###Commit Signing with GPG
17
19
18
20
####Requirements
@@ -45,7 +47,6 @@ Once you have installed GPG to your machine, you can verify it is installed and
45
47
46
48
<
img src =
" /wp-content/uploads/gpg-verify.png " srcset =
" /wp-content/uploads/[email protected] 2x " class =
" img-bordered img-responsive center " >
47
49
48
-
49
50
####Generating a GPG Key In GitKraken
50
51
51
52
If you have GPG installed on your local machine, you will be able to generate a GPG key pair from within GitKraken Client.
@@ -98,7 +99,6 @@ Below is a list of possible signature codes and what they mean:
98
99
+ ` BADSIG ` -- The signature with the keyid has not been verified.
99
100
+ ` ERRSIG ` -- It was not possible to check the signature. This may be caused by a missing public key or an unsupported algorithm.
100
101
101
-
102
102
####Uploading Your GPG Key to a Remote Hosting Service
103
103
104
104
To upload your GPG public key to your remote hosting service, we recommend viewing the documentation for the respective hosting service:
@@ -133,11 +133,15 @@ Make sure to upload the updated key on your hosting service once you have saved.
133
133
####Deleting your GPG Key
134
134
135
135
You can delete your key via terminal with the command ` gpg --delete-secret-keys ` simply append your username or key ID.
136
+
136
137
<img src =" /wp-content/uploads/delete-key.png " class =" img-bordered img-responsive center " >
137
138
138
139
There will be several prompts to make sure that you * really* want to delete your GPG key:
140
+
139
141
<img src =" /wp-content/uploads/delete-key-for-sure.png " class =" img-bordered img-responsive center " >
140
142
143
+ ***
144
+
141
145
###Commit Signing with SSH
142
146
143
147
SSH signature verification is available in Gitkraken 9.6.0 as Experimental feature
@@ -149,36 +153,34 @@ SSH signature verification is available in Gitkraken 9.6.0 as Experimental featu
149
153
` ssh -V `
150
154
- Windows: Install <a href =" https://git-scm.com/ " target =" _blank " >Git Bash</a >
151
155
152
-
153
156
####Create SSH Key
154
157
155
158
Open a Terminal and run this command:
156
- `ssh-keygen -t ed25519 -C "
[email protected] "``
157
-
158
- <
img src =
" /wp-content/uploads/gkc-ssh-keygen.png " srcset =
" /wp-content/uploads/[email protected] 2x " class =
" img-bordered img-responsive center " >
159
159
160
+ ` ssh-keygen -t ed25519 -C "[email protected] " `
160
161
162
+ <
img src =
" /wp-content/uploads/gkc-ssh-keygen.png " srcset =
" /wp-content/uploads/[email protected] 2x " class =
" img-bordered img-responsive center " >
161
163
162
164
####Configure git to sign commits with SSH
165
+
163
166
Run this command to use SSH for signing commits and pointing to the key previously created:
164
167
` git config --global gpg.format sshgit config --global user.signingkey /PATH/TO/.SSH/KEY.PUB `
165
168
166
-
167
169
####Create allowed_signers file
168
170
169
-
170
171
This file is needed to verify the key used to sign the commits is valid and known by git
171
- ` touch ~/.ssh/allowed_signers `
172
- ` git config gpg.ssh.allowedSignersFile ~/.ssh/allowed_signers `
173
- ` echo "$(git config --get user.email) namespaces=\"git\" $(cat ~/.ssh/<MY_KEY>.pub)" >> ~/.ssh/allowed_signers `
174
-
172
+ ```
173
+ touch ~/.ssh/allowed_signers
174
+ git config gpg.ssh.allowedSignersFile ~/.ssh/allowed_signers
175
+ echo "$(git config --get user.email) namespaces=\"git\" $(cat ~/.ssh/<MY_KEY>.pub)" >> ~/.ssh/allowed_signers
176
+ ```
175
177
176
178
####Enable Commit Signing by Default in Gitkraken:
179
+
177
180
Preferences > GPG > Sign Commits/Tags By defaultPreferences > Experimental > Use Git Executable and select a git executable 2.34 or later
178
181
179
182
<
img src =
" /wp-content/uploads/gkc-git-executable.png " srcset =
" /wp-content/uploads/[email protected] 2x " class =
" img-bordered img-responsive center " >
180
183
181
-
182
184
####Add the SSH key to your remote hosting
183
185
184
186
* <em class =' context-menu ' ><i class =" fab fa-github " ></i ></em > [ GitHub] ( https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account )
0 commit comments