Failed to export secret key

Alexander Leidinger Alexander at
Fri Sep 22 14:06:58 CEST 2023

Am 2023-09-13 12:34, schrieb Werner Koch:
> Hi,
> so everthing looks okay.  What I would now do is to strace pinentry;
> Here is a wpinentry wrapper I have used in the past.
> --8<---------------cut here---------------start------------->8---
> #!/bin/sh
> MYPINENTRY="/usr/local/bin/pinentry-qt"
> locale >/tmp/pinentry.err
> set >>/tmp/pinentry.err
> exec strace -o /tmp/pinentry.trc -e read=0 $MYPINENTRY -v -d "$@" 
> 2>>/tmp/pinentry.err
> #exec valgrind  $MYPINENTRY  -d "$@" 2>>/tmp/pinentry.err
> --8<---------------cut here---------------end--------------->8---
> Adjust to your needs and put

pinentry-tty doesn't support "-v" (removed), and I used the FreeBSD 

> pinentry-program /home/foo/bin/pinentry-wrapper
> into gpg-agent.conf.  gpgconf --kill gpg-agent and try again.

The issue is, that pinentry-tty can't open the tty. The errno is no such 
file or directory, but it is is visible with ls. The reason why this 
happens is that I ssh to the FreeBSD host, and from there login into a 
jail. The jail imposes some access restrictions on processes within the 

If I ssh into this account, a new tty is opened and the export works as 
it should.

As such I opened a discussion on the FreeBSD side about this behavior. 
The is at least a mismatch of what you see (the pts) and what you can do 
(normally if you see a pts, you can access it), so to me either it 
should allow the access, or not show the pts in ls...


-- Alexander at PGP 0x8F31830F9F2772BF    netchild at  : PGP 0x8F31830F9F2772BF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Gnupg-users mailing list