I would like to import a private key into GPG so I did:

gpg --allow-secret-key-import --import /path/to/key/key.asc
gpg: key 51D5DF493ECAFF88: "John Doe <john.doe@acme.com>" not changed
gpg: key 51D5DF493ECAFF88: secret key imported
gpg: Total number processed: 1
gpg:              unchanged: 1
gpg:       secret keys read: 1
gpg:  secret keys unchanged: 1

But then, the key is not listed :

$ gpg --list-secret-keys | grep 51D5DF493ECAFF88

What's wrong?

$ gpg --list-packets /path/to/key/key.asc | grep dummy

$ gpg --version
gpg (GnuPG) 2.2.4
libgcrypt 1.8.1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.