Sublime Forum

Can't sign using GPG

#1

I’m getting error while committing code in repo enabled with gpg signing.

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

The fix suggested on Error committing with gpgsign didn’t solve the issue. Also, from the same post, I don’t see this error:

fatal: cannot run gpg: No such file or directory

I use Sublime Merge: Stable Channel Build 1103

0 Likes

#2

Sublime Merge is not able (yet?) to handle the password input for your gpg key and I suspect you are using the curses based pinentry or similar. If you want gpg sign to work with Sublime Merge even when your key is initially locked, you need to switch to a gui version of pinentry (for example on macOS there is pinentry-mac).

0 Likes

#3

What OS are you on? Do you have gpg installed?

Sublime Merge does ask me for my passphrase of the GPG key I intend to sign with, though it only works once which is a problem with my agent rather than SM.

0 Likes

#4

Thanks @mrolla, pinentry-mac worked!

0 Likes