I am trying to setup automatic signing of git commits with gpg. I have a private/public key pair, that I use to authenticate to the server and be able to push commits. I would like to use the same key for signing commits (because someone could authenticate as themselves, but push a commit with my name on it).

Is that possible? gpg --list-keys returns nothing!


2 Answers 2


With the release of git 2.34 you can now use your ssh key to sign git commits.


Yes, you can auto-sign commits by setting the commit.gpgsign option.

However, you need a PGP-type key, not an SSH key. What you can do is use gpg-agent as an ssh agent.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .