How to configure GnuPG's S.gpg-agent socket location?
10,672
Since GnuPG Version 2.1.1 there exists a solution: Place a simple text-file S.gpg-agent in the gpg-homedir with following content:
%Assuan%
socket=/path/to/where/ever/you/want/S.gpg-agent
It replaces some evnvars like ${HOME}
or ${HOSTNAME}
Be careful, when using a subdirectory of /tmp
, because gpg-agent will not create needed directories.
Further reading at: https://dev.gnupg.org/T1752
Related videos on Youtube
Author by
Kalle Richter
Updated on September 18, 2022Comments
-
Kalle Richter over 1 year
GnuPG places its socket
S.gpg-agent
at~/.gnupg/S.gpg-agent
by default. I didn't find any way to configure the location of this socket nor seems there to be a manpage ofgpg.conf
.Background: I want to symlink
~/.gnupg
to an OpenAFS mount which doesn't support sockets (and avoid to create a symlink for every file in~/.gnupg
(which is a workaround) instead of just~/.gnupg
), i.e. find the most elegant solution imo. -
mirabilos over 4 yearsThis no longer works, cf. bugs.debian.org/935966
-
Jamie about 3 yearsI'd be interested in knowing why this answer was down-voted.
-
Jamie about 3 yearsUnfortunately, for Windows, it never did. In assuan-socket.c in libassuan, it has "#ifndef HAVE_W32 SYSTEM" around that functionality. I could really use that functionality right now.
-
Hirnhamster about 2 yearsWould also like to understand the downvote? It works as expected and I ran into the exact same issues. Without the additional files mentioned in the comment I would get ` error binding socket to` errors for the
S.gpg-agent.extra
andS.gpg-agent.ssh