NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.04k stars 14.09k forks source link

gpg does not have fallback non-graphical pinentry on macOS #40528

Open amckinlay opened 6 years ago

amckinlay commented 6 years ago

Issue description

Without configuration, any gpg command that requires pinentry fails either explicitly or silently when invoked from a non-graphical session.

E.g., if logged in both via SSH and a local graphical session, invoking gpg through SSH appears to hang while waiting for a graphical pinentry dialogue displayed in the other session. It is not apparent to the SSH user what is happening at first, since the user might not be in physical proximity to the remote machine, or the user's graphical session is in the background (i.e., fast user switching).

E.g., if logged in only via SSH, gpg explicitly fails with error sending to agent: No pinentry.

gpg should ship with a textual pinentry fallback by default.

Steps to reproduce

(over SSH)

someones-imac:~ someone$ gpg --import secret.asc
gpg: directory '/Users/someone/.gnupg' created
gpg: keybox '/Users/someone/.gnupg/pubring.kbx' created
gpg: /Users/someone/.gnupg/trustdb.gpg: trustdb created
gpg: key 7F0E3A2FA4778096: public key "Sir Example <example@example.com>" imported
^C
gpg: signal Interrupt caught ... exiting

Technical details

matthewbauer commented 6 years ago

This is a bug in pinentry-mac, but something that I would like to fix. See this comment from pinentry-mac:

https://github.com/GPGTools/pinentry-mac/blob/master/Source/main.m#L52-L82

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.