Home > database >  Seeing "this user has not yet uploaded their public key" in git commits, but my gpg key is
Seeing "this user has not yet uploaded their public key" in git commits, but my gpg key is

Time:11-10

I'm currently seeing this message near my Git commits, even though I'm signing them using "git commit -S":

enter image description here

When I check Settings > SSH and GPG Keys, I see the same GPG key Id (see below).

enter image description here

When I run $git config --global user.signingkey, I get the following result. I've added Xs and Ys to hide the actual value, but the first half is the key listed in "Subkeys" (from the above screenshot), and the second half is the key listed in "Key ID" (again, from the above screenshot):

01XXXXXXXXXXXXXXXXXXXXAYYYYYYYYYYYYYA012

What else do I need to do so that my commits will show-up as Verified?

CodePudding user response:

As documented in "Statuses with vigilant mode enabled"

Unverified means any of the following is true:

  • The commit is signed but the signature could not be verified.
  • The commit is not signed and the committer has enabled vigilant mode.
  • The commit is not signed and an author has enabled vigilant mode.

Double-check which key is actually used locally, when you are signing commits.

As mentioned in "Signing commits"

If you have multiple keys or are attempting to sign commits or tags with a key that doesn't match your committer identity, you should tell Git about your signing key.

Check git config --global user.signingkey (as in here)


The OP WEFX adds in the comments:

I think my problem was my global config email address was set to a different email address.
I fixed that, created a new GPG key, and started over w/ a new branch as well.
Now, my commits are listed as "Verified", and I'm able to push.

CodePudding user response:

I think my specific problem was caused by my config email address not matching the email on the GPG key. I checked my email by running this:

git config --global user.email

and noticed the returned email was an alternate email address of mine. I set the email value to the correct address, generated a new key, started w/ a new branch, and now all of my commits are listed as "Verified". More importantly, I'm able to push to the desired branch as well!

(Note - I'm not sure if it's 100% necessary to generate a new key and new branch, etc. I just wanted to start clean and eliminate anymore problems)

  • Related