I am just wondering how can VC can be used to sign commit using gpg, Currently I am using vc without sign mean I am using vc-next-action to perform git commit


vc doesn't know anything about signing commits. magit does, though. If you're willing to have all your commits signed you can set commit.gpgSign in your git configuration file.

  • I'll use commit.gpgSign in git local configuration then. That solves my problem. Thanks! – nerding_it Sep 29 '20 at 15:58
  • Does it ask for passphrase? Mine is failing because there is not tty to ask for passphrase. – Pankaj Jangid Oct 4 '20 at 17:15
  • 1
    @Jangid, you should look through the existing questions on how to use gpg with emacs, I'm certain this has been answered before. – rpluim Oct 5 '20 at 14:12
  • @rpluim, my gpg is working fine with emacs. I can encrypt files with .gpg extension, I can sign and encrypt emails. But only vc things are not working with gpg. As a workaround what I do is this. I run a pull request on cli, enter passphrase and because the ttl is set to about 10 mins, vc-next-action works without going into passphrase phase. – Pankaj Jangid Oct 6 '20 at 3:59
  • I get prompted by gpg-agent (admittedly a gui popup) when signing a commit. You should perhaps ask a separate question. – rpluim Oct 6 '20 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.