Page MenuHome GnuPG

can't open gpg-agent
Closed, InvalidPublic

Description

From gnupg-w32-2.2.30 above and gnupg-w32-2.3.2 above, gpg cannot open gpg-agent. The error message is like:

>gpg -d password.txt.gpg
gpg: encrypted with elg2048 key, ID AABE0D7867BFA077, created 2008-03-25
      "Lu Wei <luweitest@gmail.com>"
gpg: can't connect to the gpg-agent: Filename too long
gpg: can't connect to the gpg-agent: Filename too long
gpg: keydb_search failed: No agent running
gpg: public key decryption failed: No secret key
gpg: decryption failed: No secret key

"Filename too long" is confusing since that's not true. Test environment is Windows XP SP3.
Maybe it's another WinXP specific problem; but if it could be resolved easily, please take a look, and I am ready to help testing.

Details

Version
2.2.30 above, 2.3.2 above

Event Timeline

luweitest created this object in space S1 Public.
luweitest updated the task description. (Show Details)

What is the output of gpgconf --list-dirs ?

E:\key>gpgconf --list-dirs
sysconfdir:C%3a\Documents and Settings\All Users\Application Data\GNU\etc\gnupg
bindir:C%3a\Program Files\gnupg\bin
libexecdir:C%3a\Program Files\gnupg\bin
libdir:C%3a\Program Files\gnupg\lib\gnupg
datadir:C%3a\Program Files\gnupg\share\gnupg
localedir:C%3a\Program Files\gnupg\share\locale
socketdir:E%3a\key
dirmngr-socket:E%3a\key\S.dirmngr
agent-ssh-socket:E%3a\key\S.gpg-agent.ssh
agent-extra-socket:E%3a\key\S.gpg-agent.extra
agent-browser-socket:E%3a\key\S.gpg-agent.browser
agent-socket:E%3a\key\S.gpg-agent
homedir:E%3a\key

The "sysconfdir" "C:\Documents and Settings\All Users\Application Data\GNU" does not exist actually. Does it matter?

No, it does not matter.

You changed %LOCALAPPDATA% to some place which is not local (i.e. e:\key). You should not do this.

aheinecke added a project: Not A Bug.
aheinecke added a subscriber: aheinecke.

This is a support question and not a bug. You should ask such questions on the channels for Gpg4win, which does the Community support for GnuPG on Windows: https://www.gpg4win.org/community.html

Off topic but for the record:
We do not support Windows XP anymore. If you have an offline machine that should never be updated and just keep working for decades. Use a Linux

There are absolutely no guarantees or tests that new GnuPG Versions will continue to work on Windows XP.

Yes I do understand Windows XP is not supported. Just in case it is a minor problem that is easy to fix and will not cost you much effort. I'd like to add more information: I do not change
%LOCALAPPDATA%. There is no such environment variable. A similar environment variable is:
APPDATA=C:\Documents and Settings\myname\Application Data
I do set GNUPGHOME=E:\key, which I think should be allowed because I do not want my personal info be stored in system drive.