3

Whenever I use my gpg key to sign commits I always get these weird symbols in the commit's signature.

$ git log --show-signature
commit 16d7a1f5403ca0332146da7bcfe4594f6d997c2b (HEAD -> master)
gpg: Signature made 07/03/2021 22:47:48 <F3><F1><E2><EF> <F4><E2><F9><EC> <EC><F8><E1><F9><EC><E1><ED>^M
gpg:                using EDDSA key redacted^M
gpg: Good signature from "redacted" [ultimate]^M
Author: redacted
Date:   Sun Mar 7 22:47:48 2021

I suspected this has something to do with gpg's or git's encoding so I added the LC_ALL=C.UTF-8 environment variable and tried a few changes to git's config with no success.

Anyone knows what are these symbols and how do I get rid of them?


Gpg v2.2.27

Windows 10 v20H2

Git v2.30.1

Orbs
  • 41
  • 1
  • 5
  • DD/MM/YYYY is an unusual format for the "signature made" date format. Is it possible that has been customized? Does `gpg --verify` show the same behavior? – Schwern Mar 07 '21 at 22:25
  • Try `git --no-pager log --show-signature` or `git -c core.pager=more log --show-signature`. – ElpieKay Mar 08 '21 at 01:48
  • @Schwern Using git's `git verify-commit` the output is the same with the special symbols. I don't think I can verify a git commit using only gpg. @ElpieKay Tried both of them and the output was the same minus the `^M`. – Orbs Mar 08 '21 at 16:52
  • @Orbs Sign something and try `gpg --verify` on it. If the problem occurs then the problem is gpg. Also try [looking at the raw commit text](https://stackoverflow.com/questions/65445147/how-can-it-be-that-a-commit-object-has-2-authors/65445681#65445681). – Schwern Mar 08 '21 at 19:25
  • @Schwern Ok, so I signed an empty text file and executed gpg --verify on it and the symbols still show up but in different shapes now(`gpg: Signature made 08/03/2021 22:29:03 ≥σ∩ °σ∙∞ΓΘ°σ∙∞Θ`).I guess that's a bug in gpg4win then. – Orbs Mar 08 '21 at 20:43

1 Answers1

1

I got rid of the special symbols by going to region settings in windows setting and ticking the "Beta: Use Unicode UTF-8 for worldwide language support" Checkbox.

Screenshot of region settings

Orbs
  • 41
  • 1
  • 5