Why are my commits not verified?
TL;DR: Check your repo’s config for user.email, which will override your global config.
I was working on a project the code for which is in GitHub and saw in my pull request something I hadn’t seen before (or at least hadn’t noticed). It said “Unverified” in a bronze color inside a outlined pill on the line associated with each commit.
I started looking around, and learned that it had to do with the email associated with the commit. This page tells the story: https://docs.github.com/en/authentication/managing-commit-signature-verification/displaying-verification-statuses-for-all-of-your-commits
Of course, I needed to check my git config. I’m on a Mac, so it was
The email address there was correct, though.
Then, I checked the repo directory itself:
And there it was:
[user] name = Christian Burk email = email@example.com
Once I changed the address in the
my-repo/.git/config to the correct one and added one of my already loaded keys as a signing key:
Susquent commits were verified.
How did my global and local git configs get out of whack? I really don’t know. But now they are in whack once more.