3

CONTEXT

Since I decided to sign all my commits, whenever I tried running :Gcommit and write a commit message I would get:

fugitive: error: failed to sign the data

I tried everything that people suggested on [this other question] (gpg failed to sign the data fatal: failed to write commit object [Git 2.10.0]) and also this other one but, apparently, it was just a different error.

Looking through the issues on the Fugitive repository, I noticed an open issue really close to what I was experiencing but without answer.

  • GPG is installed through brew.
  • GPG Agent is installed and running.
  • Using Vim not Neovim
  • All the symlinks are properly set.

QUESTION

How to sign commits inside Vim using Fugitive and GPG?

Community
  • 1
  • 1
Jonathan Soifer
  • 2,715
  • 6
  • 27
  • 50

1 Answers1

4

After ignoring this feature for months, I finally found out a way to fix this!

The answer was on this link, kudos to "Blimmer": git config --global gpg.program $(which gpg) echo "no-tty" >> ~/.gnupg/gpg.conf

It worked for me!

Jonathan Soifer
  • 2,715
  • 6
  • 27
  • 50