I'm trying to setup auto signing with git and gpg to Github but its not working.
I've got it to the point where, when I commit by the below it works and correctly signs my commits.
git commit -S
However despite running the below commands, I still can't autosign.
git config --global commit.gpgsign
git config --global user.signingkey <MY KEY>
contents of .gitconfig below.
[user]
email = nicholas.stocks@forcepoint.com
signingKey = <MYKEY>
[commit]
gpgsign = true
[gpg]
program = gpg
Am I missing a step, or do you always have to type "git commit -S"?
Thanks
p.s. not interesting in a debate on whether you should autosign. Just accept that I want to :) I only commit from a protected VM, held on an encrypted laptop.
Solution: Update git to latest version. As I was using CentOS, I followed this post as it made it nice and easy. https://gist.github.com/mahamuniraviraj/ac4807c43694ec4d8d360ebf12e93df1