Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`gpg: keyserver send failed: No keyserver available` when sending to hkp://pool.sks-keyservers.net

I'm using the below command

gpg --keyserver hkp://pool.sks-keyservers.net --send-keys <MY-8-DIGIT-SIGNATURE>

as per guided by this article https://getstream.io/blog/publishing-libraries-to-mavencentral-2021/

However, when I try it, it reports

gpg: sending key <MY-16-DIGIT-SIGNATURE> to hkp://pool.sks-keyservers.net
gpg: keyserver send failed: No keyserver available
gpg: keyserver send failed: No keyserver available

What's wrong with my command above?

Update findings
This works on macOS Catalina, Intel Core i7 machine. But it doesn't work on macOS Big Sur, M1 ARM64 machine.

Not sure if it is Big Sur or M1 ARM64 machine issue?

like image 844
Elye Avatar asked Dec 17 '22 11:12

Elye


1 Answers

Found a workaround to the issue.

First I kill the dirmngr using command

gpgconf --kill dirmngr

Then, I start dirmngr with --standard-resolver

dirmngr --debug-all --daemon --standard-resolver

Finally, on another terminal, I run

gpg --verbose --keyserver hkp://pool.sks-keyservers.net --recv-keys 0x0A292B5F8A3C247F586F19D7E1AF518CC4B1DC35

And this gives me the result of

gpg: key E1AF518CC4B1DC35: "Kristof (GPGTools) <[email blocked]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

Not sure why I need the --standard-resolver, but it works for my case.

UPDATE

Found a better way to have the standard-resolver by default for dirmngr. This is just by adding standard-resolver to ~/.gnupg/dirmngr.conf file.

like image 56
Elye Avatar answered Dec 20 '22 01:12

Elye