I'm having a heck of a time installing a Debian Chroot for PPC64. The problem is not debootstrap, rather, its getting GnuPG to locate and install the key I need.

The man pages for gpg are fairly useless, but that's no surprise. Searching is equally frustrating, which is leading me to believe I can't perform the simple task because GnuPG does not support it (it would not be the first time).

Here's what I have tried:

# gpg --version
gpg (GnuPG) 1.4.19
# gpg --import 75DDC3C4A499F1A18CB5F3C8CBF8D6FD518E17E1
gpg: can't open `75DDC3C4A499F1A18CB5F3C8CBF8D6FD518E17E1': No such file or directory
gpg: Total number processed: 0
# gpg --import --key 75DDC3C4A499F1A18CB5F3C8CBF8D6FD518E17E1
gpg: Option "--key" is ambiguous
# gpg --import --keyid 75DDC3C4A499F1A18CB5F3C8CBF8D6FD518E17E1
gpg: unknown keyid-format `75DDC3C4A499F1A18CB5F3C8CBF8D6FD518E17E1'

How do I instruct GnuPG to fetch and install a key based on the key ID?

2 Answers 2


You are using the wrong option.

--import is used if you want to import the key from a file.

--recv-keys will fetch your keys from a keyserver.

  • What about importing keys with the key ID? Mar 21, 2019 at 22:46

You might actually be suffering from two issues at the same time.

Importing Keys

gpg --import [file] loads key information from a file or stdin, but does not query key servers for the key. gpg --recv-keys does some additional things: it queries a key server (preconfigured in ~/.gnupg/gpg.conf or passed with --keyserver), fetches the result (internally, these two steps are usually implemented as an HTTP request) and finally imports the key.


I'm also not sure whether you need that key in your personal GnuPG home directory, or whether you want to install software from third party repositories using apt-get. In this case, don't directly run something like

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv [key-id]

to store the key into apt's "private" keyring (apt-key is a kind of wrapper around GnuPG, for example taking care of storing into the correct keyring). apt does not query your normal user's GnuPG keyring!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.