You are not logged in.
Pages: 1
Hi, I was setting up Arch Linux on a new machine and wanted to use the XDG Base Directory specification to store my configuration and data files, including gnupg files, by setting the $GNUPGHOME variable to "$XDG_DATA_HOME/gnupg". This variable itself works, but I received these errors when I ran gpg --full-gen-key:
gpg: keyblock resource '/home/nate/.local/share/gnupg/pubring.kbx': No such file or directory
....
gpg: failed to create temporary file '/home/nate/.local/share/gnupg/.#lk0x000055a19e0b0a40.meliora.85933': No such file or directory
gpg: can't connect to the agent: No such file or directory
gpg: agent_genkey failed: No agent running
Key generation failed: No agent runningThis command works fine and gnupg automatically creates the files and folders it needs, if I don't set $GNUPGHOME, storing its files in the default ~/.gnupg folder instead.
I learned that gnupg can't even write to the $XDG_DATA_HOME folder. What gives, and how do I solve this problem? I suppose I can make it use the ~/.gnupg folder first, and then later move the folder to $XDG_DATA_HOME, adjust its permissions, then set $GNUPGHOME to point to that new location, but is there a better, more elegant or straightforward way?
Any help would be appreciated!
Offline
This works for me:
$ declare -x XDG_DATA_HOME=~/.local/share
$ declare -x GNUPGHOME=$XDG_DATA_HOME/gnupg
$ mkdir -p .local/share/gnupg
$ gpg --gen-keyIf gpg-agent don't start automatically:
$ gpg-agent --daemonyou also need pinentry installed of course.
Offline
Did you see the GnuPG entry in the wiki?
In particular, the discussion links.
Eenie meenie, chili beanie, the spirits are about to speak -- Bullwinkle J. Moose
It's a big club...and you ain't in it -- George Carlin
Registered Linux user #149839
perl -e 'print$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10); '
Offline
Pages: 1