Has anyone tried creating GPG keys for encrypted pillars on Ubuntu 18.04?

I'm using the following command to attempt to generate the keys:

gpg --gen-key --homedir /etc/salt/gpgkeys

When I run that I get the usual set of questions, full name, email, etc. However when it gets to the passphrase screen, I seem to be unable to get past it without entering a passphrase. I get a ncurses display that looks like this:

gpg passphrase

If I just hit enter to get past it, it immediately pops right back up. If I hit "Cancel" then I get the following error:

gpg: agent_genkey failed: Operation cancelled
Key generation failed: Operation cancelled

Anyone run into this?

closed as off-topic by Jenny D, womble May 12 at 23:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – womble
If this question can be reworded to fit the rules in the help center, please edit the question.


If you don't have a passphrase, you can just as well not bother to encrypt your data in the first place, because anyone who can get access to the server with the data will also be able to use the key.

If you for some reason want to pretend to be secure while not actually being it, you can use the argument --passphrase='' to gpg. But you shouldn't do that.

Not the answer you're looking for? Browse other questions tagged or ask your own question.