GnuPG 2.42 on Windows XP: cannot connect to gpg-agent with a non-default homedir

Werner Koch wk at gnupg.org
Tue Sep 22 11:01:02 CEST 2026


On Mon, 21 Sep 2026 18:44, Anton Shepelev said:

> I observe this problem with GnuPG 2.42 -- the last
> version that works on my Windows XP.  gpg-agent does not

Although 42 is in general a good answer, you probably mean GnuPG 2.4.2
released 3 years ago ;-)

I think that even the current GnuPG version will work on XP SP3.

> invocation.  Killing it does not help.  How does
> ^gpg-connect-agent test whether an agent is running, and
> how is that test related to the homedir?  Can it be

I think the problem you have is that you also copied the lock files
maybe even with active locks and thus the stale lock file detection did
not work.

gpg-connect-agent, like all other components, opens the file given by
"gpgconf -L agent-socket", read the port number and the magic cookie,
connect to that port on localhost and the agent checks that the cookie
matches.

There are several ways to get the homedir, either using the envvar
GNUPGHOME, a Registry entry, using the standard %APPDATA%\gnupg, or
using what an optional gpgconf.ctl side-by-side to the gpgconf.exe
specifies.

  gpg --debug ipc -K

also shows how the agent is accessed.


Shalom-Salam,

   Werner

-- 
The pioneers of a warless world are the youth that
refuse military service.             - A. Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 284 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20260922/2d1189d1/attachment.sig>


More information about the Gnupg-users mailing list