The manpage of gpg states that the PINENTRY_USER_DATA environment variable is passed via gpg-agent to pinentry. However this doesn't seem to be true. Setting pinentry-program in ~/.gnupg-gpg-agent.conf to a script that dumps its environment to a file, I don't see any PINENTRY_USER_DATA when calling gpg with the following invocation: gpg --sign testfile However, the exact same thing works with gpg2. Looking around in the source tree for gnupg, I'm confused because it seems like PINENTRY_USER_DATA isn't mentioned anywhere except in the doc. (It occurs in gnupg2, however.) Unless I'm getting something wrong, PINENTRY_USER_DATA should be removed from the gnupg documentation, or support for that variable should be actually implemented.