Linux – gpg2 asking for passphrase when importing secret keys

gnupgimportlinuxopenpgppgp

I am trying to transfer my gpg secret keyring from gpg1 (1.4.21) to gpg2 (2.1.15) using

gpg2 --import ~/.gnupg/secring.gpg

gpg2 is asking for the passphrases of all the secret keys in the keyring.

Why would it require the passphrases at this stage (I should only have to supply them when using the keys) and how can I prevent this, i.e. import the keyring without supplying passphrases?

System is Arch Linux, kernel 4.7.6. Thanks.

Best Answer

The issue was explained here in the GnuPG bugtracker; I did not see that earlier today.

The solution is:

gpg2 --batch --import ~/.gnupg/secring.gpg
Related Question