1 year ago

#148206

test-img

David Xia

Does gpg-agent.conf support environment variables for extra-socket option and in general?

I'm using gpg-agent (GnuPG) 2.3.4 on M1 Mac, OS X 12.1. I want to use the extra-socket option in ~/.gnupg/gpg-agent.conf. If I have

extra-socket $HOME/.gnupg/S.gpg-agent.extra

and run gpgconf --kill gpg-agent; and gpg-connect-agent reloadagent /bye, the agent fails to start.

gpg-connect-agent: no running gpg-agent - starting '/opt/homebrew/Cellar/gnupg/2.3.4/bin/gpg-agent'
gpg-connect-agent: error running '/opt/homebrew/Cellar/gnupg/2.3.4/bin/gpg-agent': exit status 2
gpg-connect-agent: failed to start gpg-agent '/opt/homebrew/Cellar/gnupg/2.3.4/bin/gpg-agent': General error
gpg-connect-agent: can't connect to the gpg-agent: General error
gpg-connect-agent: error sending standard options: No agent running

If I hardcode the absolute path for the socket

extra-socket /Users/dxia/.gnupg/S.gpg-agent.extra

the agent starts successfully and works.

gpg-connect-agent: no running gpg-agent - starting '/opt/homebrew/Cellar/gnupg/2.3.4/bin/gpg-agent'
gpg-connect-agent: waiting for the agent to come up ... (5s)
gpg-connect-agent: connection to the agent established
OK

Are env vars not supported for extra-socket? I'm confused because an env var for log-file in gpg-agent.conf works fine. 🤔

log-file $HOME/.gnupg/gpg-agent.log

gnupg

gpg-agent

0 Answers

Your Answer

Accepted video resources