Re: [BUG] v2.45+: git commit -S invalidates signature for non-UTF-8 messages
- From
D. Ben Knoble <ben.knoble@gmail.com>
- Date
- Apr 22, 2026, 18:13 UTC
- Message-ID
- <CALnO6CB5TX=zi7Ghhnvv4wCatLPLKJFT5g1_hf4c+pno2zC3fQ@mail.gmail.com>
- In-Reply-To
- <aeakf0xcjSteTMZp@fruit.crustytoothpaste.net>
On Mon, Apr 20, 2026 at 6:12 PM brian m. carlson <sandals@crustytoothpaste.net> wrote:
Show 21 quoted lines
> > On 2026-04-20 at 08:59:05, Kushal Das wrote: > > Hi all, > > > > Every `git commit -S` since v2.45.0 produces a permanently-BAD > > signature when the commit message contains bytes that are not valid > > UTF-8 AND `i18n.commitEncoding` is unset (i.e. the default case). > > Verification fails under both `gpg --verify` and any non-GnuPG signer. > > The failure is deterministic: it happens every time, on every > > non-UTF-8 commit, no card or external tooling needed. > > I'm not sure that's a valid configuration. The commit message either > needs to be UTF-8 or you need to declare the encoding so Git can convert > it. > > > My best guess is commit 6206089cbd0b1cb30a017ec904567f040ab4cea0 starting > > this (and I am maybe 100% wrong in identifying the cause). > > It does bisect to that commit. I wrote that patch originally, but it > got modified and sent upstream by someone else. I'm not sure where it > got introduced, though.
According to the `amlog` notes ref: <20231002024034.2611-9-ebiederm@gmail.com>
-- D. Ben Knoble