I'm interested on having each of my commits signed with my GPG key. Since I use magit for interfacing with git, I was wondering if telling magit to sign each commit was possible (or some workaround to achieve this was feasible, at least).
In Magit commits are created using the committing popup (c). That popup would therefore be a good place to start looking for gpg support. If you do that, then you will find this:
=S Sign using gpg (--gpg-sign=)
So type = S and the select a key. To avoid having to do that every time you create a commit you can save the value of that argument (and all other currently set arguments) using C-x C-s.
You might still have to type the passphrase every time. To avoid that you should start a gpg-agent and make sure Emacs knows about it, e.g. using the
keychain shell script and the
keychain-environment Emacs package.
Also see and set the
--show-signature argument in the logging popup.