gpg: can't connect to the gpg-agent: IPC connect call failed

2025年8月12日 16:01:28 -0700

Hi Cygwin,
I have a problem. I'm running Windows 10 Cygwin and hadn't updated Cygwin since July 16. I updated Windows 10 on 8/7 installing KB5064838 (.NET 8.9.19 Update for x64 Client.) I have two Windows 11 machines, and a virtual Windows 10 machine last updated 7/15. None of the other machines have this problem. All machines copy the ~/.gnupg file. They also each have a copy of an encrypted password file. One of the Windows 11 machines is new. I've been building it and am now configuring it. The new Windows 11 machine had a problem I was able to fix. I caused this problem by using gpg before copying the .gnupg directory, so the directory was created with a common.conf file containing "use-keyboxd". When copying the .gnupg directory I kept existing files, so that configuration directive caused gpg to ignore secret keys. Removing that file fixed the problem on that machine. Then I went back to the Windows 10 machine updated with KB5064838. Now, with no significant changes other than KB5064838, gpg fails as follows:
(This runs inside a script)
```
+ gpg -vv --output home --decrypt home.gpg
gpg: enabled compatibility flags:
# off=0 ctb=85 tag=1 hlen=3 plen=268
:pubkey enc packet: version 3, algo 1, keyid 05916FDA5225F00E
    data: [2047 bits]
gpg: public key is 05916FDA5225F00E
# off=271 ctb=d4 tag=20 hlen=2 plen=0 partial new-ctb
:aead encrypted packet: cipher=9 aead=2 cb=16
    length: unknown
gpg: using subkey 05916FDA5225F00E instead of primary key 0D4A2C912C5594AD
gpg: encrypted with rsa2048 key, ID 05916FDA5225F00E, created 2025年04月11日
   "***** ******* <*********@gmail.com>"
gpg: using pgp trust model
gpg: key 568B3948A0D16ADB: accepted as trusted key
gpg: key 0D4A2C912C5594AD: accepted as trusted key
gpg: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg: waiting for the agent to come up ... (8s)
gpg: waiting for the agent to come up ... (7s)
gpg: waiting for the agent to come up ... (6s)
gpg: waiting for the agent to come up ... (5s)
gpg: waiting for the agent to come up ... (4s)
gpg: waiting for the agent to come up ... (3s)
gpg: waiting for the agent to come up ... (2s)
gpg: waiting for the agent to come up ... (1s)
gpg: can't connect to the gpg-agent: IPC connect call failed
gpg: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg: waiting for the agent to come up ... (8s)
: (Repeated)
gpg: keydb_search failed: No agent running
gpg: public key decryption failed: No secret key
gpg: decryption failed: No secret key
+ rc=2
+ [[ 2 != 0 ]]
+ rm home
+ echo 'ERROR: Decryption failure 2.'
ERROR: Decryption failure 2.
+ echo 'No file changed.'
No file changed.
+ exit 1
```
The agent actually starts and gpg-agent.exe shows up in process list (three times.) After the script ends gpg-agent.exe (apparently times out and) terminates. I have since fully updated Cygwin and Windows 10 (applying today's update) but the problem still recurs. I'm not going to update the virtual Windows 10 machine. I tried uninstall the update, but the recovery environment didn't think I had Administrator privileges (probably because I only log in with a local account) and system restore could only get me back as far as August 9th. My working theory is that KB5064838 causes this problem. I don't know enough about IPC or Cygwin internals to have confidence in the theory, though.
Thanks,
F. Eskesen
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple

Reply via email to