AuthorDate wrong (?) when using git gpg signing

Since enabling git signing, I have noticed that the AuthorDate on git commits is now set to a fixed point in time a few days ago. I have the following git global config and don’t have any git environment variables set. Is this an expected feature / bug ? Any clues on how to resolve this? At the command line I can show the CommitDate using the --pretty=fuller option, but in github it displays the AuthorDate, which makes it hard to track when commits were made.

$ git config --global

user.name=Matthew Berryman
user.email=matthew@acrossthecloud.net
user.signingkey=D6FC2D2CEACD3AF1009321B7AFA7BE950EB00D72
gpg.program=/usr/local/bin/gpg
commit.gpgsign=true

FWIW, version numbers:

git version 2.15.1
gpg (GnuPG) 2.2.3

libgcrypt 1.8.1

Also, the system clock is set correctly.

Update: only seems to be happening when committing in the Atom editor.

I was able to get Atom git signed commits to behave by first doing a signed commit from the command line, and then subsequent commits from Atom are both signed and have the correct AuthorDate, so problem solved. It was specific to some repos of mine / my clients, and I’ve not been able to reproduce on a new repo with a mix of unsigned and signed commits across repos.

1 Like