Re: WSL2: Gpg4win pinentry not available after PIN cache expires

2024-06-03 Thread Werner Koch via Gnupg-users
Hi!

>- Sign git commits in WSL2(Debian)
>- gpg-agent uses Gpg4win's pinentry GUI to allow PIN entry

So you are mixing Unix software with Windows software.  I wonder that
this works at all.  The properties of the IPC between Windows and Unix
are different.  That IPC is not designed to work cross-platform.  The
Windows gpg-agent expects a Windows pinentry and vice versa.

Using the native Windows gpg from the WSL git should work because there
is a well defined interface between them. 


Shalom-Salam,

   Werner


-- 
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein


openpgp-digital-signature.asc
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


WSL2: Gpg4win pinentry not available after PIN cache expires

2024-05-31 Thread David Tagatac
Hello,

My use case is:

   - Sign git commits in WSL2(Debian)
   - gpg-agent uses Gpg4win's pinentry GUI to allow PIN entry


This works well immediately after restarting my Windows PC. However, after
the PIN cache expires (currently set to 86400 seconds), signing commits
fails with

> ❯❯❯ gpg-agent
> gpg-agent[11881]: gpg-agent running and available
> ❯❯❯ git ci -S -m "asdf"
> error: gpg failed to sign the data
> fatal: failed to write commit object
>

gpg-agent.conf in WSL2:

>  ❯❯❯ cat ~/.gnupg/gpg-agent.conf

default-cache-ttl 86400
> max-cache-ttl 86400
> pinentry-program "/mnt/c/Program Files (x86)/GnuPG/bin/pinentry-basic.exe"


Versions:

   - Windows 11 build 22631.3593
   - Gpg4win 4.3.1
   - [WSL2/Debian] gpg-agent (GnuPG) 2.2.40


Things that don't fix the issue:

   - Reinstall Gpg4win
   - taskkill /f /im kleopatra.exe; taskkill /f /im gpg-agent.exe; taskkill
   /f /im scdaemon.exe; (And start Kleopatra again)
   - gpgconf --kill gpg-agent
   - wsl --shutdown


Things that do fix the issue:

   - Restart the PC
   - Use pinentry-curses
   - Use pinentry-tty


Is this a known issue, or can anyone offer any hints for debugging?

Thanks,
David
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users