6

Despite me installing pinentry, I still get the following error:

xxxxxxxMacxxxxx:~ MAU$ gpg2 -c --cipher-algo=aes
gpg-agent[89931]: can't connect to the PIN entry module: IPC connect call failed
gpg-agent[89931]: command get_passphrase failed: No pinentry
gpg: problem with the agent: No pinentry
gpg: error creating passphrase: Operation cancelled
gpg: symmetric encryption of `[stdin]' failed: Operation cancelled
2
  • 1
    Did you restart the agent after installing pinentry? Commented Sep 3, 2013 at 12:15
  • @HelmutGrohne As in kill 89931?
    – rake
    Commented Sep 9, 2013 at 17:06

3 Answers 3

5

I've had that error message when trying to decrypt a (symmetrically encrypted) file on OS X (macOS Sierra 10.12.4). Solution was to add the option --pinentry-mode loopback

bla$ gpg -d ciphertext.gpg 
gpg: AES encrypted data
gpg: problem with the agent: No pinentry
gpg: encrypted with 1 passphrase
gpg: decryption failed: No secret key

bla$  gpg --pinentry-mode loopback -d ciphertext.gpg 
gpg: AES encrypted data
Enter passphrase: ...
gpg: encrypted with 1 passphrase
...plaintext...
4

You may have an old (and wrong) entry in your gpg-agent.conf file. Check this config file for an incorrect path to the pinentry-program and delete this line.

0

I've had this after using sudo -u foo -H bash, solution was to ssh localhost to get a proper fresh environment.

Diffing env | sort showed several differences between the two sessions, but modifying the sudoey one to be the same didn't help. The thing I didn't try was starting XDG.

Possibly the difference is the existence of an XDG session? (Running Debian mostly-8.10)

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.