When importing keys that were retrieved via WKD (e.g. manually downloaded or by some other program like Kleopatra) only public keys should be imported. As far as I can see, there is no way to set the internal IMPORT_NO_SECKEY keyserver option flag from the command line with the --import-options option (or some other option).
Description
Description
Revisions and Commits
Revisions and Commits
rG GnuPG | |||
rG4c65dfeb2878 gpg: Rename recently added import option no-seckeys to only-pubkeys. | |||
rG489b9c6ebb50 gpg: Rename recently added import option no-seckeys to only-pubkeys. | |||
rGe208ccc66c34 gpg: Rename recently added import option no-seckeys to only-pubkeys. | |||
rG7788aba7d864 gpg: Add --import-option "no-seckeys". | |||
rGdb556fcb7ada gpg: Add --import-option "no-seckeys". | |||
rG8e691efb0588 gpg: Add --import-option "no-seckeys". |
Related Objects
Related Objects
Event Timeline
Comment Actions
This doesn't seem to work. I get
$ gpg --version gpg (GnuPG) 2.4.6-beta4 libgcrypt 1.11.0 $ gpg --verbose --import-options no-seckeys ted.tester-pub.asc gpg: unknown option 'no-seckeys' gpg: invalid import options
I suspect that this is caused by the special handling of the "no-" prefix in parse_options.
I verified this hypothesis by renaming the option to "only-pubkeys". This makes the option work for me.
Comment Actions
With gpg4win-beta-75++ tryiing to import a secret key results in no import:
C:\Users\g10code.WIN-TEST3>gpg --verbose --import --import-options only-pubkeys "z:neue_testzertifikate\Edward_Tester_0xB5297489_SECRET.asc"
[...]
gpg: sec rsa3072/06E28F5FB5297489 2023-03-08 Edward Tester <Edward.Tester@demo.gnupg.com>
gpg: Importieren geheimer Schlüssel ist nicht erlaubt
gpg: Anzahl insgesamt bearbeiteter Schlüssel: 1
gpg: gelesene geheime Schlüssel: 1
I believe that it was was intended with this task.