Replies: 10 comments 11 replies
-
|
|
Beta Was this translation helpful? Give feedback.
-
$ git commit --help | grep sign
-s, --signoff
Add Signed-off-by line by the committer at the end of the commit log message. The meaning of a signoff
-S[<keyid>], --gpg-sign[=<keyid>]
GPG-sign commits. The keyid argument is optional and defaults to the committer identity; if specified,
--no-gpg-sign
signed.
designed not to force UTF-8 on projects. If all participants of a particular project find it more convenient$ git commit -s -m "change title"
$ git --no-pager show --pretty=fuller --show-signature 1c69f1800e6a4ca764d9d0b5027c2ba962cd5b5f
commit 1c69f1800e6a4ca764d9d0b5027c2ba962cd5b5f
Author: Ilyar <761285+ilyar@users.noreply.github.com>
AuthorDate: Thu Mar 16 11:21:11 2023 +0100
Commit: Ilyar <761285+ilyar@users.noreply.github.com>
CommitDate: Thu Mar 16 11:21:11 2023 +0100
change title
Signed-off-by: Ilyar <761285+ilyar@users.noreply.github.com>
$ git commit -S -m "use key"
$ git --no-pager show --pretty=fuller --show-signature 4b1fa45ac86305fd955397d95694350fc700f670
commit 4b1fa45ac86305fd955397d95694350fc700f670 (HEAD -> main, origin/main, origin/HEAD)
gpg: Signature made Thu 16 Mar 2023 12:05:34 PM CET
gpg: using RSA key 01C0F1BCFA480C23C24793E04331FA7A0AF8BF99
gpg: Good signature from "Ilyar <761285+ilyar@users.noreply.github.com>" [ultimate]
Author: Ilyar <761285+ilyar@users.noreply.github.com>
AuthorDate: Thu Mar 16 12:05:34 2023 +0100
Commit: Ilyar <761285+ilyar@users.noreply.github.com>
CommitDate: Thu Mar 16 12:05:34 2023 +0100 |
Beta Was this translation helpful? Give feedback.
-
|
When you change your email to GitHub throwaway email, you should add new user id to the GPG key you use when signing commits to GitHub. More info: StackOverflow |
Beta Was this translation helpful? Give feedback.
-
|
after adding the new ID to the key, remove the old public key from github and add the updated key. your old commits wont be affected. |
Beta Was this translation helpful? Give feedback.
-
|
You need to add your email |
Beta Was this translation helpful? Give feedback.
-
|
FIXED: I had an extra whitespace in the git config email address. |
Beta Was this translation helpful? Give feedback.
-
|
The same issue for me, @rosmanov did you manage to find a solution? |
Beta Was this translation helpful? Give feedback.
-
|
I've found a solution - you need to remove a digit prefix from the |
Beta Was this translation helpful? Give feedback.
-
|
Type: Question ❓ @nikicat, could you provide more details? Where should the user remove the digit prefix? 1. Local git configurationShould the user replace the email in the local git configuration? Example: # [INFO] Get current email
git config --global user.email
17247677+Kristinita@users.noreply.github.com
# [QUESTION] Should the email be like this?
git config --global user.email
Kristinita@users.noreply.github.com2. E-mail for GPG keyOr perhaps the user should add the GitHub no-reply e-mail to the GPG key without the digit prefix? For example, my page https://github.com/settings/keys: Should the email address for GPG key not contain Or did you mean something else? Thanks. |
Beta Was this translation helpful? Give feedback.
-
|
I fixed this issue! After two long days of searching, I have finally found out how to fix the issue The ProblemNo, the problem wasn't because the email wasn't in the key itself nor was it because I didn't put it to GitHub. The problem is that by default, GPG keypairs don't have signing privileges on the main key. This is a security practice done by GnuPG to ensure you can't sign everything with your main key and need to share a subkey. The Solution
If the solution doesn't work...I have no hope for you... |
Beta Was this translation helpful? Give feedback.









Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Body
GitHub shows GPG-signed commits as "Unverified" with the following error:
I have the "Keep my email addresses private" checkbox turned on in https://github.com/settings/emails and the tip under it states:
And the committer email exactly matches that email. Let's take this commit, for example:
But GitHub displays it as "Unverified":

It looks like a bug. If it is not, please help me to fix this issue.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions