public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* pinentry-tty, gpg-agent, and no way to enter password
@ 2019-04-16 16:30 David Dombrowsky
  2019-04-17 15:07 ` David Dombrowsky
  0 siblings, 1 reply; 2+ messages in thread
From: David Dombrowsky @ 2019-04-16 16:30 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1: Type: text/plain, Size: 1324 bytes --]


Back in 2018, I mentioned that there was reliable way to enter a gpg
password on the cygwin console:
http://cygwin.1069669.n5.nabble.com/pinentry-curses-not-available-td143121.html

From there I was able to cobble together a solution using a locally
patched version of pinentry-curses.  Somewhere along the line, that
stopped working.

I am now back where I started.

Does anyone have a solution for the following:
1. ssh into a windows box running cygwin sshd
2. run `echo hello | gpg -sab`

This worked until recently.  Now I get:

gpg: using "01D5A625A30C0E6A" as default secret key for signing
gpg: signing failed: Invalid IPC response
gpg: signing failed: Invalid IPC response

checking the output of gpg-agent, I see:

gpg-agent[2261]: gpg-agent (GnuPG) 2.2.13-unknown started
gpg-agent[2261]: handler 0x200549e0 for fd 7 started
gpg-agent[2261]: starting a new PIN Entry
cbreak failure, exiting
gpg-agent[2261]: failed to unprotect the secret key: Operation cancelled


pinentry-w32 works, but it pops up a GUI window and thus requires an RDP
session.  Does anyone have a working solution that doesn't require
access to the windows console?

-- 
David Dombrowsky, Software Engineer
davek@6thstreetradio.org | 518-374-3204
https://www.linkedin.com/in/david-dombrowsky-94334415


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: pinentry-tty, gpg-agent, and no way to enter password
  2019-04-16 16:30 pinentry-tty, gpg-agent, and no way to enter password David Dombrowsky
@ 2019-04-17 15:07 ` David Dombrowsky
  0 siblings, 0 replies; 2+ messages in thread
From: David Dombrowsky @ 2019-04-17 15:07 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1: Type: text/plain, Size: 872 bytes --]

On 4/16/19 12:29 PM, David Dombrowsky wrote:
> From there I was able to cobble together a solution using a locally
> patched version of pinentry-curses.  Somewhere along the line, that
> stopped working.

I put debug prints in pinentry-tty, and it is opening the correct tty.
However, running the command to set the terminal into the right mode
will fail.  If I comment that out, something interesting happens:

tty/pinentry-tty.c
356       c = fgetc (ttyfi);
357       switch (c)

This call to `fgetc`, while it points to a FILE handle opened to the
correct tty, will read NOTHING.  My session is on /dev/pty0, but a
subprocess that opens that terminal for reading neither fail, nor read
anything.

Any ideas?

-- 
David Dombrowsky, Software Engineer
davek@6thstreetradio.org | 518-374-3204
https://www.linkedin.com/in/david-dombrowsky-94334415


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-17 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16 16:30 pinentry-tty, gpg-agent, and no way to enter password David Dombrowsky
2019-04-17 15:07 ` David Dombrowsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).