pinentry does not work for both desktop login and SSH login

Bug #1852696 reported by Jeffrey Walton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pinentry (Ubuntu)
New
Undecided
Unassigned

Bug Description

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 $HOME/.gnupg:

   $ ls -A ~/.gnupg/
   3F537D88ADBC1677-private-key.asc pubring.kbx
   private-keys-v1.d trustdb.gpg

Here is 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

And then:

   $ 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

My .bashrc includes:

   export GPG_TTY=$(tty)

Search is finding a lot about Git signing failures, but not results for this particular situation. I have to turn the problem over to the maintainers since I can't figure it out.

What users like me expect is, things just work regardless of how we are logged in.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.