GPG signed commits on git

GPG signature

Git commits could be signed using GPG signature.

Howto is here

Common problems

Outdated default gpg program on Windows

Currently on windows git has its own gpg program, which is outdated
version 1. And it is not possible to set it to remember passphrase.

So after creating the signature the new version of gpg (version 2)
installed by Gpg4win should be set as gpg program for git:

1
git config --global gpg.program 'C:\Program Files (x86)\GnuPG\bin\gpg.exe'
Remember password

For gpg-agent configuration should be set (usually inside ~/.gnupg/gpg-agent.conf):

1
2
default-cache-ttl 3600
max-cache-ttl 100000
Outdated version on linux

To set gnu-agent remember passphrase, first ~/.gnupg/gpg-agent.conf should be created as described earlier,
second, gpg version 1 doesn’t work with gpg-agent version 2. So gpg2 should be set as gpg.program for git configuration:

1
git config --global gpg.program gpg2