The error that git receives is: gpg: signing failed: No secret key It should work fine when you specify the key explicitly: git commit --amend -S<ID> The shell is irrelevant, I have reproduced it with bash and GNOME.