[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnupg-users
Subject:    Re: Failed to export secret key
From:       Alexander Leidinger via Gnupg-users <gnupg-users () gnupg ! org>
Date:       2023-09-08 13:40:43
Message-ID: 4cdff47b673304e40a3339bb5155ae5f () Leidinger ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Am 2023-09-08 15:26, schrieb Werner Koch:
> On Fri,  8 Sep 2023 13:49, Alexander Leidinger said:

>> 2023-09-08 13:37:54 gpg-agent[94491] DBG: error calling pinentry:
>> Operation cancelled <Pinentry>
> 
> You clicked on CANCEL or closed the window.

No prompt at all in the console / ssh connection (and no graphics, so 
nothing to click on). So no manual cancelling from me.

>> gpg: key 89DE8BFC8A2A81F8C9BD2F7940C7373A4DE34E7C: asking agent for
>> the secret parts
> [...]
>> gpg: key 89DE8BFC8A2A81F8C9BD2F7940C7373A4DE34E7C: error receiving key
>> from agent: Operation cancelled - skipped
> 
> You canceled, gpg-agent could not unprotect the key and and thus you 
> get
> the error code.
> 
> Given that you said it worked in loopback mode - I assume the pinentry
> is broken and returns Cancel due to other reasons.  Did you
> 
> GPG=$(tty)
> export GPG_TTY

% echo $GPG_TTY
/dev/pts/5

> in your target's bashrc etc?  The simple tty pinentry is used and it
> needs to know its tty - is /dev/pts/5 the correct one?  Try running

Yes it is:
% tty
/dev/pts/5

And there is no other one (this is a FreeBSD jail):
% ll /dev/pts
total 0
crw--w----  1 netchild tty 0x190  8 Sep. 15:36 5

> pinentry on the target directly:
> 
> $ pinentry
> getpin
> 
> should show the prompt.  Does it - if not, strace the process etc.

I only have two pinentry binaries installed, both are not for a 
graphical environment:

% ll /usr/local/bin/pinentry*
lrwxr-xr-x  1 root wheel   12B 31 Aug. 08:20 /usr/local/bin/pinentry@ -> 
pinentry-tty
-r-xr-xr-x  1 root wheel   71K  1 Sep. 00:13 
/usr/local/bin/pinentry-curses*
-r-xr-xr-x  1 root wheel   61K 31 Aug. 03:00 
/usr/local/bin/pinentry-tty*

% pinentry
Warning: using insecure memory!
OK Pleased to meet you
getpin
pinentry-tty
PIN:
D asdf
OK
bye
OK closing connection

% pinentry-curses
Warning: using insecure memory!
OK Pleased to meet you
getpin
<courses dialog popped up in the ssh connection>
D asdf
OK
bye
OK closing connection

Bye,
Alexander.

-- 
http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netchild@FreeBSD.org  : PGP 0x8F31830F9F2772BF

["signature.asc" (application/pgp-signature)]

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic