Using --gen-key --batch doesn't seem to work anymore
post at filias.name
Mon Jan 19 11:29:39 CET 2015
I have been using a Script which gets the key ID via
/usr/local/bin/gpg --list-keys root@ | grep -B1 'backup-key' | sed -n 's/pub.*\/\([:alnum:]*\)/\1/p' | cut -d' ' -f1
and if there is no key ID found, it tries to generate a key via
/usr/local/bin/gpg --gen-key --batch < /root/gpg_config 2>&1 | cut -d' ' -f3 | tail -n1
the gpg_config file is looking like this:
Name-Comment: backup-key for $hostname
Somehow, since the last update, the key Generation does not work anymore. If I try to execute that exact step on the command line, I get:
# gpg -vv --gen-key --batch < gpg_config
gpg: agent_genkey failed: Operation cancelled
gpg: key generation failed: Operation cancelled
I put a line in the .gnupg/gpg-agent.conf, because I thought it might have to do something with the Agent:
I must say, my experiences with gnupg are very limited, so I can simply miss something. Is there an obvious reason why this fails?
Some help would be greatly appreciated.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the Gnupg-users