[Solved] why local user.mail overrides global user.mail in git?

3 years ago by spez to c/programming

So, I have a GPG key with two noreply email addresses. One for codeberg.org and one email address for github.com. When using the user@noreply.codeberg.org of codeberg as user.mail globally, I can make commits which show up as verified on codeberg.org. But if use the same mail as my git user.mail the commit on github will show up as unverified. Even though the particular repo's mail is set to the noreply email address of github which can be verified with git config user.mail but for some reason the global ~/.gitconfig mail is used to perform committs. Am I doing GPG management wrong or anything else wrong?

atheken 17 points 3 years ago

I believe the setting is user.email so maybe confirm that’s what you have set in both? Git will silently ignore settings that aren’t used/defined.

path: 0 4977499, hotness: undefined, score: 17, children: 7
spez 11 points 3 years ago

I am a damm moron. Thank you very much!

path: 0 4977499 4977618, hotness: undefined, score: 11, children: 6
glad_cat 15 points 3 years ago

You're not a moron, you learned something useful. My experience for the past 20 years is being a moron over and over again, and I make sure to transmit that knowledge.

path: 0 4977499 4977618 4977688, hotness: undefined, score: 15, children: 3
beejjorgensen 5 points 3 years ago

"The expert has failed more times than the beginner has even tried." πŸ˜ŠπŸ‘

path: 0 4977499 4977618 4977688 4981161, hotness: undefined, score: 5, children: 0
spez 4 points 3 years ago

thanks man :)

path: 0 4977499 4977618 4977688 4977701, hotness: undefined, score: 4, children: 0
Baizey 3 points 3 years ago

path: 0 4977499 4977618 4977688 4982847, hotness: undefined, score: 3, children: 0
elxeno 8 points 3 years ago

I am a damm moron.

Username checks out

path: 0 4977499 4977618 4988575, hotness: undefined, score: 8, children: 0
atheken 3 points 3 years ago

Not at all! Glad it was something simple!

path: 0 4977499 4977618 4977698, hotness: undefined, score: 3, children: 0
dyslexicjedi 9 points 3 years ago

/u/spez is trying to fix Reddit with our help /s

path: 0 4977893, hotness: undefined, score: 9, children: 2
spez 5 points 3 years ago
if (enshittification){
dont();
}

git push origin main

path: 0 4977893 4978328, hotness: undefined, score: 5, children: 1
crodjer 1 point 3 years ago

The git push always happens?

path: 0 4977893 4978328 5000399, hotness: undefined, score: 1, children: 0
programming
programming

@programming.dev

login for more options
28840
3730
3325

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev


go to feed...