In the hope that this might help someone else... When trying to sign over SSH I was getting `Operation cancelled`: ```bash -> % echo "test" | gpg --clearsign gpg: using "FD2073A7" as default secret key for signing -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
test gpg: signing failed: Operation cancelled gpg: [stdin]: clear-sign failed: Operation cancelled ``` I'd tried `pinentry-gtk-2` (from `pinentry-gtk2`) and it didn't work for this situation: ```bash -> % sudo apt install pinentry-gtk2 -> % sudo update-alternatives --config pinentry # Select option for `/usr/bin/pinentry-gtk-2` -> % echo "test" | gpg --clearsign gpg: using "FD2073A7" as default secret key for signing -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 test gpg: signing failed: Inappropriate ioctl for device gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device ``` While it didn't work, it was progress. After running `GPG_TTY=$(tty); export GPG_TTY` it worked! But each time I connect, I need to set the `GPG_TTY` and `update-alternatives` for `pinentry` to `/usr/bin /pinentry-tty` or `/usr/bin/pinentry-gtk-2`. Not a good solution, but at least it works. (Ref: https://unix.stackexchange.com/questions/257061/gentoo-linux-gpg- encrypts-properly-a-file-passed-through-parameter-but- throws-i/257065#257065) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1758071 Title: Graphical prompt (pinentry-gnome3) invoked even when connected via ssh To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnupg2/+bug/1758071/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
