I have created a GPG key with gpg --gen-key, accepted all the default options. I do gpg --list-keys and receive:

pub   2048R/B296038B 2015-11-10
uid       [ uneing.] my name <myname@gmail.com>
sub   2048R/E86C0F4D 2015-11-10

I then do gpg --keyserver hkp://keyserver.ubuntu.com --send-keys B296038B.

The keyserver answers with (translated from german, not literal):

keyserver filetransfer error: not a public key
Sending to keyserver failed: not a public key

What am I doing wrong? I thought I had created a public and a secret key. I also tried adding sub 12345R/E86C0F4D which failed with the same error.

EDIT: I edited in the original values. This was ran on Windows with gpg4win. I ran exactly the same process on an Ubuntu machine and everything went fine, so this is perhaps a bug in gpg4win.

  • Please don't overobfuscate your questions. For example, your key size is hardly something that can distinguish you. Additionally, it is good practice to at least use values that are allowed as input, XXXXXXXX is no valid key ID (built from hex digits), DEADBEEF would be a canonical example in the allowed alphabet and is widely recognized as an example value. – Jens Erat Nov 10 '15 at 16:25

This looks like an issue with the key ID you provide. As you don't provide the actual command line you executed, I can't exactly describe what the wrong output was. Likely you used something like 1234R/XXXXXXXX to define the key to work with, which is not understood by GnuPG.

An example with my key: for the key

$ gpg --list-keys a4ff2279
pub   8192R/AA4FF2279 2012-12-25


gpg --keyserver hkp://keyserver.ubuntu.com --send-keys a4ff2279

while capitalization of the key ID is not relevant. Generally, usage of short key IDs is strongly disrecommended because of possible collision attacks. Use long key IDs instead.

Your Answer

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

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