Reputation: 23587
I am trying to push my staging repository on oss.sonatype.org
to central repository, but this action is getting failed and i am getting following exception
Event: Failed: Signature Validation
typeId signature-staging
failureMessage No public key: Key with id: (XXXXX) was not able to be located on http://keyserver.ubuntu.com:11371. Upload your public key and try the operation again.
I used gbp
to generate public and well private key for me and i even sent public key to the server with following command
gpg --keyserver hkp://pool.sks-keyservers.net --send-keys EE539F98
Still i am getting same exception.I cross checked and there is only one Sub Key
, not sure what else i need to do to push public key so as this can be found by nexus
Upvotes: 66
Views: 9368
Reputation: 2598
according to solutions above, I tried these 2:
gpg --keyserver hkp://keyserver.ubuntu.com --send-keys 71657D8A
gpg --keyserver hkp://keys.openpgp.org --send-keys 71657D8A
But only the second one works, I can search my key on keys.openpgp.org
after submitting
Upvotes: 1
Reputation: 183
gpg --keyserver hkp://keys.openpgp.org --send-keys your_public_key
I then retrived an email and cheked this key at https://keys.openpgp.org/
Upvotes: 1
Reputation: 121
I got the error message:
No public key: Key with id: (xxxx) was not able to be located on http://keyserver.ubuntu.com:port. Upload your public key and try the operation again.
Then i entered the following command on console:
gpg --keyserver hkp://keyserver.ubuntu.com --send-keys xxxx
(removed the :port from the end of the hostname) It works!
Upvotes: 12
Reputation: 1009
Same thing here, the thing was :
Maybe our application server was blocking this request, or maybe this one was rejected directly by Sonatype (like explained in https://issues.sonatype.org/browse/OSSRH-6697)
Anyway we found a workaround that I wanted to share with you guys :
gpg --gen-key
gpg2 --list-keys
gpg2 --keyserver hkp://pool.sks-keyservers.net --send-keys KEYID
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys KEYID
Please let me know if it helps!
Regards
Upvotes: 4
Reputation: 38732
The various OpenPGP keyserver synchronize, but that takes some time. If you know which keyserver will be queried, you can directly upload your key there.
I did:
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys EE539F98
gpg --keyserver hkp://keyserver.ubuntu.com --send-keys EE539F98
and now your key can successfully be found on Ubuntu's keyserver, without having to wait until it automatically synchronized.
Actually I ran the recv-command multiple times to find a keyserver in their pool which already had your key.
Upvotes: 65