0

I'm using PGP since version 2.3a, and I had liked the interactive user interface of it. Specifically when opening a file with PGP keys, PGP asked me what I want to do with it, allowing me to confirm each single key found.

GPG however is completely different there: When using key import, all keys from a file are imported without further questions.

Browsing the manual page I found no option to enable some interactive mode, so I'm asking:

Isn't here a way to let me confirm each key before importing using GPG?

2 Answers 2

0

Use sq keyring split so that you have one key per file.

sq keyring split foo.gpg
for key in output-*; do
    gpg --show-keys "$key"
    if read -p "Import? " && [[ $REPLY = [Yy]* ]]; then
        gpg --import "$key"
    fi
    rm -v "$key"
done
2
  • What is sq? My system (OpenSUSE Leap 15.4) suggests: "ispell [ path: /usr/bin/sq, repository: zypp (repo-oss) ]"
    – U. Windl
    Feb 7, 2023 at 8:51
  • It's "sequoia" (another OpenPGP toolkit). I don't think GnuPG CLI tools have an equivalent operation built in. Feb 7, 2023 at 8:55
0

It seems GnuPG cannot do that, because the main author thinks such a feature is not needed.

See Allow "interactive" import of keys.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .