Problem with connecting to gpg-agent

Dashamir Hoxha dashohoxha at
Sun Jul 29 19:12:15 CEST 2018


I have docker container that I use for testing, which normally has a root
user, and I have also created a non-root user (called developer).
The tests work for the root user but fail for the non-root user.
I have been able to localize the problem to this error:
$ gpg --list-secret-keys
gpg: can't connect to the agent: IPC connect call failed

However when it is called with `sudo` it works:
$ sudo gpg --list-secret-keys
gpg: WARNING: unsafe ownership on homedir '/home/developer/.gnupg'
sec   rsa4096/18D1DA4D9E7A4FD0 2016-05-14 [SC] [expires: 2026-07-27]
uid                 [ultimate] Test 1 <test1 at>
ssb   rsa4096/12A2B2669B636DD4 2016-05-14 [E] [expires: 2026-07-27]

The version of gpg is 2.2.4 (default installation on bionic).
I have run out of ideas about how to debug it further or what might be
wrong. This problem does not happen on my host computer (gpg 2.1.18 on
stretch). Most probably it is something related to the restrictions of the
docker container for the non-root user, or something like this. But I am
not able to understand the error message:
"can't connect to the agent: IPC connect call failed"

Can you help me to debug it further or to fix it?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Gnupg-devel mailing list