GPG key generation - timeout on OSX due to lack of entropy
I'm trying to generate a series of GPG keys gpg --gen-key
but coming up with the same error that there's not enough entropy to generate a set.
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
jsdgpg: agent_genkey failed: Timeout
Key generation failed: Timeout
I can't seem to find any solution specific to OS X. Is there a way to generate more random numbers and avoid the timeout?
I'm using OS X 10.12.6 and gpg (GnuPG) 2.2.1
.
Perhaps you could just rm -rf ~/.gnupg
. It works for my situation. I just force stopped the first time I ran gpg --gen-key
, which might lead me to this agent_genkey failed: Timeout
error.
In my case running killall gpg-agent
allowed the next key generation attempt to succeed.
This is preferable to deleting ~/.gnupg
and/or ~/.gpg-agent-info
if you can avoid doing so (as referenced in another answer).
(On macOS 11.2.3 Big Sur)