SmartGit: Cannot sign commits due to pinentry error

40 Views Asked by At

Ever since I enabled commit signing w/my gpg key, SmartGit hits this error when trying to commit:

Commit: gpg failed to sign the data: failed to write commit object
    ~/bryntum/git/release> git commit --cleanup=whitespace --allow-empty --signoff --no-verify --file=/tmp/smartgit14450682861634054394/commit3530301403453248883.tmp
    gpg failed to sign the data:
    gpg: WARNING: server 'gpg-agent' is older than us (2.2.27 < 2.4.3)
    gpg: Note: Outdated servers may lack important security fixes.
    gpg: Note: Use the command "gpgconf --kill all" to restart them.
    [GNUPG:] WARNING server_version_mismatch 0 server 'gpg-agent' is older than us (2.2.27 < 2.4.3)
    gpg: problem with fast path key listing: IPC parameter error - ignored
    [GNUPG:] KEY_CONSIDERED 28257FB5CF22EA9EC8B9AD35C0D6A968320D8DA1 2
    [GNUPG:] BEGIN_SIGNING H8
    [GNUPG:] PINENTRY_LAUNCHED 1230116 gnome3 1.1.1 - - :0 - 1000/1000 -
    gpg: signing failed: pinentry error
    [GNUPG:] FAILURE sign 83886166
    gpg: signing failed: pinentry error
    failed to write commit object

I don't believe the gpg versions on my system are out of sync:

> gpg-agent --version
gpg-agent (GnuPG) 2.2.27
...

> gpg --version
gpg (GnuPG) 2.2.27
...

Maybe that comes from an internal gpg tool embedded in SmartGit? In my repository settings I have /usr/bin/gpg as the GPG Program and that matches which gpg from the terminal.

In any case, I am not sure the version warning is the problem. Rather I think it is "pinentry error" when SmartGit is attempting to get my gpg key passphrase. This works from the command prompt:

> git commit -m foo

The error message in SmartGit has the correct key in the KEY_CONSIDERED log line.

In case any of these matter:

  • SmartGit 23.1.1
  • git 2.34.1
  • Pop OS 22.04 (Ubuntu) w/all updates applied
  • KDE Plasma desktop

After running apt update:

❯ apt list gpg
Listing... Done
gpg/jammy-security,jammy-updates,now 2.2.27-3ubuntu2.1 amd64 [installed,automatic]
gpg/jammy-security,jammy-updates 2.2.27-3ubuntu2.1 i386

Any suggestions?

0

There are 0 best solutions below