I'm trying to get GPG to work in my dev container (default python container) under Windows WSL2 for signed commits and getting error when trying to reload gpg agent.
Following official guide:
- Installed gpg4win on Windows
- Connected to Dev Container and added
pinentry-program /mnt/c/Program\ Files\ \(x86\)/Gpg4win/bin/pinentry.exe
to~/.gnupg/gpg-agent.conf
file
And when I'm trying to reload gpg agent using command gpg-connect-agent reloadagent /bye
I'm getting:
gpg-connect-agent: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg-connect-agent: failed to create temporary file '/root/.gnupg/.#lk0x000055a2a31ddd90.aae1d09ea764.617': No such file or directory
gpg-connect-agent: can't connect to the agent: No such file or directory
gpg-connect-agent: error sending standard options: No agent running
Tried these solutions and none of them worked: