<div dir="ltr">Hi,<div><br></div><div>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).</div><div>The tests work for the root user but fail for the non-root user.</div><div>I have been able to localize the problem to this error:</div><div>```</div><div><div>$ gpg --list-secret-keys</div><div>gpg: can't connect to the agent: IPC connect call failed</div><div>```</div><div><br></div><div>However when it is called with `sudo` it works:</div><div>```</div><div>$ sudo gpg --list-secret-keys</div><div>gpg: WARNING: unsafe ownership on homedir '/home/developer/.gnupg'</div><div>/home/developer/.gnupg/pubring.kbx</div><div>----------------------------------</div><div>sec   rsa4096/18D1DA4D9E7A4FD0 2016-05-14 [SC] [expires: 2026-07-27]</div><div>      A9446F790F9BE7C9D108FC6718D1DA4D9E7A4FD0</div><div>uid                 [ultimate] Test 1 <<a href="mailto:test1@example.org">test1@example.org</a>></div><div>ssb   rsa4096/12A2B2669B636DD4 2016-05-14 [E] [expires: 2026-07-27]</div><div>```</div></div><div><br></div><div>The version of gpg is 2.2.4 (default installation on bionic).</div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">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:</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">"<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">can't connect to the agent: IPC connect call failed</span>"</span><br></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Can you help me to debug it further or to fix it?</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Thanks,</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Dashamir</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><br></div><div><br></div></div>