How to solve gpg: invalid option "--full-generate-key"?
I want to sign my GitHub commits with GnuPG. So I'm trying to generate a GPG key as instructed in this article.
But the problem is when I run this command on the terminal:
gpg --full-generate-key
I get the error:
gpg: invalid option "--full-generate-key"
I've also tried gpg2 --full-generate-key
and still get the same error.
I've followed the instructions on this answer to instal gpg. The installation succeeds, but the error remains. Is there any other installation step I'm missing? Or maybe a different option other than --full-generate-key
to generate a GPG key?
Solution 1:
From the GnuPG documentation:
--full-generate-key
--full-gen-key
Generate a new key pair with dialogs for all options. This is an extended version of--generate-key
.
--full-generate-key
seems to be a new synonym, added in GnuPG 2.2. The manpage for Ubuntu 18.04 mentions it, but not older manpages, which only list --full-gen-key
. Note that --full-gen-key
itself is a rename of the --gen-key
option in GnuPG 2.1.0 (2014), so you have to use the older option name with Ubuntu 14.04.
Solution 2:
Facing the same issue. Here is my output
ubuntu@ubuntu:~$ gpg --full-generate-key
gpg: Invalid option "--full-generate-key"
ubuntu@ubuntu:~$ gpg --full-gen-key
gpg: Invalid option "--full-gen-key"
ubuntu@ubuntu:~$ gpg --generate-key
gpg: Invalid option "--generate-key"
The following command worked,
gpg --gen-key