I'm not entirely sure what the problem is here, but on centos 7 the documentation for the gpg renderer describe creating a key, which does not work, seems tied to the --homedir option not working as expected. Any ideas on how to work around this? When using the default ~/.gnupg (no --homedir option) things work just fine
gpg --gen-key --homedir /etc/salt/gpgkeys :(
gpg (GnuPG) 2.0.22; Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
Your selection? 1
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) 4096
Requested keysize is 4096 bits
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 0
Key does not expire at all
Is this correct? (y/N) y
GnuPG needs to construct a user ID to identify your key.
Real name: Test
Name must be at least 5 characters long
You selected this USER-ID:
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.
gpg: can't connect to the agent: IPC connect call failed
gpg: problem with the agent: No agent running
gpg: can't connect to the agent: IPC connect call failed
gpg: problem with the agent: No agent running
gpg: Key generation canceled.
Any help is greatly appreciated. I tried explicitly running the gpg-agent with a --homedir option set to /etc/salt/gpgkeys without any success, along with a few other random attempts with env vars and such.
I'm tempted to just create the keys, then copy all of it to /etc/salt/gpgkeys but I have a feeling that won't work if this isn't working?