Signed commit in VC

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Signed commit in VC

Pankaj Jangid-2
I am trying to configure signed commit in my Git setup. I have followed
the instructions for git add added following in my ~/.gitconfig

> [commit]
> gpgsign = true

I am not sure if VC utilizes EasyPG settings or not. But just in case it
does then this is my setting in my Emacs config,

> (setq epg-pinentry-mode 'loopback)

This setting prompts me for a passphrase when I send a signed or
encrypted email using C-c C-m ... commands. This also works when I open
".gpg" files.

But when I try to git-commit using C-x v v (VC commands), it fails with
this message in log,

> error: gpg failed to sign the data
> fatal: failed to write commit

That is because it is not prompting me for passphrase and git is
attempting to commit without it. This will obviously fail.

I want to know what settings are required for VC to prompt the user for
gpg passphrase? So that the signed git-commit works properly.

BTW, git signed commit works okay from command line because of the
[commit] setting above.