I'm working on a Ubuntu 18.04.3 LTS x86_64 machine (fully patched). The machine has a GNOME3 desktop. Sometimes I sit at the workstation, and other times I SSH into the workstation.
When sitting at the workstation Git commit signing works. I use
git commit -S ... -m ..., and things work as expected. I get a UI prompt for my GnuPG password and the work flows as usual.
When I work remotely on the same workstation over SSH I have to forgo commit signing because:
$ git commit -S log.h -m "Remove unneeded header" error: gpg failed to sign the data fatal: failed to write commit object
I'm using a "standard" configuration for SSH, Git and GnuPG. I am not aware of any special configurations for this setup. However, the repo is located on my local LAN (and not GitHub, GitLab, etc):
$ cat .git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = ssh://git@callmaster:/var/callboot-src fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master
There is no specialized GnuPG conf file in
$ ls -A ~/.gnupg/ 3F537D88ADBC1677-private-key.asc pubring.kbx private-keys-v1.d trustdb.gpg
Search is not finding the issue. I'm getting a lot about Git signing failures, but not results for this particular situation.
What configuration option am I missing so signing works locally and over SSH?
pinentry on the machine:
$ ls -Al /usr/bin/pinentry-* -rwxr-xr-x 1 root root 63992 Feb 5 2018 /usr/bin/pinentry-curses -rwxr-xr-x 1 root root 72184 Feb 5 2018 /usr/bin/pinentry-gnome3 lrwxrwxrwx 1 root root 30 Sep 2 19:14 /usr/bin/pinentry-x11 -> /etc/alternatives/pinentry-x11
$ ls -Al /etc/alternatives/pinentry-* lrwxrwxrwx 1 root root 24 Sep 2 19:14 /etc/alternatives/pinentry-x11 -> /usr/bin/pinentry-gnome3 lrwxrwxrwx 1 root root 40 Sep 2 19:14 /etc/alternatives/pinentry-x11.1.gz -> /usr/share/man/man1/pinentry-gnome3.1.gz