There is already a more generic thread on the topic, Remember GPG password when signing git commits, but the answer there doesn't work for me. My environment is:
- Mac (macOS@10.15.7)
- Bash (the default that comes with macOS)
- Git v2.27.0
- GnuPG v2.2.20 (libgcrypt 1.8.5)
I installed GnuPG via Homebrew and wrote the following settings into the ~/.gnupg/gpg-agent.conf file:
default-cache-ttl 1209600 # 14 days
max-cache-ttl 31536000 # 1 year
But the cache isn't applied. Every ten minutes or so after I do a git commit, gpg prompts me to input the password again.
This is my global .gitignore file:
[commit]
gpgSign = true
What am I missing?