Submitted by hescominsoon on Sat, 01/05/2019 - 23:26 Pro Licensee
I tired to generate a key for signing backups and got this: Failed to create backup key : Key generation failed : gpg: skipping control `%no-protection' ()
Status:
Active
Comments
Submitted by hescominsoon on Sat, 01/05/2019 - 23:33 Pro Licensee Comment #1
Submitted by hescominsoon on Sat, 01/05/2019 - 23:37 Pro Licensee Comment #2
Submitted by hescominsoon on Sat, 01/05/2019 - 23:44 Pro Licensee Comment #3
ooooook...when i tired to generate a key the second time i got this: Failed to create backup key : Key generation failed : A GPG key with the same email address already exists
so then i tired to create a backup schedule where the owners can restore the backups and i get: Failed to save scheduled backup : Only signed backups can be restored by virtual server owners
Submitted by JamieCameron on Sun, 01/06/2019 - 18:58 Comment #4
Is this a VM that you're creating the key or, or a real physical machine?
Submitted by hescominsoon on Tue, 01/08/2019 - 18:27 Pro Licensee Comment #5
bare metal machine.
Submitted by hescominsoon on Wed, 01/16/2019 - 16:31 Pro Licensee Comment #6
any ideas? It's been a while.
Submitted by JamieCameron on Thu, 01/17/2019 - 20:31 Comment #7
Could be a compatibility issue with gnupg. Which Linux distro and version are you running, and are you just running the stock version of
gpg
?Submitted by hescominsoon on Sat, 02/02/2019 - 15:30 Pro Licensee Comment #8
ubuntu 16.04. I installed it from minimal and then let virt do the rest. No changes on my end.
Submitted by hescominsoon on Sat, 02/02/2019 - 16:14 Pro Licensee Comment #9
I had this machine reloaded as a result of a virt corrupting and when i try to generate the backup key I get: Failed to create backup key : Key generation failed : gpg: skipping control `%no-protection' ()
Submitted by hescominsoon on Sat, 02/02/2019 - 16:14 Pro Licensee Comment #10
apt install gnupg Reading package lists... Done Building dependency tree Reading state information... Done gnupg is already the newest version (1.4.20-1ubuntu3.3). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Submitted by hescominsoon on Sat, 02/02/2019 - 16:19 Pro Licensee Comment #11
so now when i try to generate the key virt throws: Failed to create backup key : Key generation failed : A GPG key with the same email address already exists
does the loop look familiar...like at the first of the ticket...
Submitted by JamieCameron on Sat, 02/02/2019 - 18:40 Comment #12
Odd, it looks like the key generation succeeded but Virtualmin assumes that it failed, leaving you in an inconsistent state. The work-around is to SSH in as
root
and rungpg delete-secret-key
to remove the leftover key, then re-try generation in Virtualmin.Submitted by hescominsoon on Mon, 02/04/2019 - 14:00 Pro Licensee Comment #13
no dice: root@web3:~# gpg delete-secret-key gpg: can't open `delete-secret-key'
Submitted by hescominsoon on Mon, 02/04/2019 - 14:01 Pro Licensee Comment #14
root@web3:~# apt install gnupg Reading package lists... Done Building dependency tree Reading state information... Done gnupg is already the newest version (1.4.20-1ubuntu3.3).
Submitted by JamieCameron on Tue, 02/05/2019 - 00:53 Comment #15
The proper command is like
gpg --delete-secret-keys email@domain.com
The upcoming 6.06 Virtualmin release will include the ability to import a key.
Submitted by hescominsoon on Tue, 02/05/2019 - 14:37 Pro Licensee Comment #16
ok key deleted.
i then ran the key generation again. Failed to create backup key : Key generation failed : gpg: skipping control `%no-protection' () I then tried the command: gpg --delete-secret-keys wwarren@etc-md.com gpg (GnuPG) 1.4.20; Copyright (C) 2015 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.
gpg: key "wwarren@etc-md.com" not found: eof gpg: wwarren@etc-md.com: delete key failed: eof
Submitted by hescominsoon on Tue, 02/05/2019 - 14:54 Pro Licensee Comment #17
guess what appeared? gpg --delete-secret-keys wwarren@etc-md.com gpg (GnuPG) 1.4.20; Copyright (C) 2015 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.
gpg: key "wwarren@etc-md.com" not found: eof gpg: wwarren@etc-md.com: delete key failed: eof root@web3:~# gpg --delete-secret-keys wwarren@etc-md.com gpg (GnuPG) 1.4.20; Copyright (C) 2015 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.
gpg: key "wwarren@etc-md.com" not found: eof gpg: wwarren@etc-md.com: delete key failed: eof root@web3:~# gpg --delete-secret-keys wwarren@etc-md.com gpg (GnuPG) 1.4.20; Copyright (C) 2015 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.
sec 2048R/6F2A0D2F 2019-02-05 backup encryption key wwarren@etc-md.com
Delete this key from the keyring? (y/N) y This is a secret key! - really delete? (y/N) y
I think webmin is timing out on the key generation process. it appears there needs to be a status check by webmin against the gpg key generation process?
Submitted by JamieCameron on Wed, 02/06/2019 - 00:08 Comment #18
It sounds like the key generation process is taking longer than Virtualmin expects. I'll extend the timeout in the next release.