-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue importing gpg key: gpg: keyserver receive failed: Cannot assign requested address #9
Comments
Hi! I think this is only a Debian 8 related issue where gnupg binds to gnupg1. On Debian 9, Can you just confirm that you are using Debian 8? |
It is debian:stretch (Debian 9) FROM debian:stretch
... |
Sorry, I missed that. /usr/bin/gpg --version Home: /root/.gnupg Not sure what happen in your case, maybe for some reason dirmngr was not installed and the installation of gnupg2 package installed it as a dependence. Now we have documented the dirmngr requirement explicitly. Thanks. |
This just happened to me in an unrelated container (docker/php; same setup, stretch and gnupg installed), and enabling IPv6 support in Docker allows GPG to bind and succeed even if you don't have IPv6 internet. (Commenting here mainly because this is the first Google result for the error) |
For me adding the following to the Dockerfile did the trick: RUN mkdir ~/.gnupg
RUN echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf The advantage to jmendeth's solution is that this doesn't require reconfiguring docker itself, saving users of the Dockerfile to take this extra preinstallation step. (The disadvantage is obvious: The Dockerfile needs to be changed.) See https://rvm.io/rvm/security#ipv6-issues (Like jmendeth I'm just commenting here because this was the first hit on Google. To me the error happened with a fresh |
lentschi's solution worked for me. I too was getting errors from fresh builds. |
Hope to fix: gpg: keyserver receive failed: Cannot assign requested address usbarmory/usbarmory-debian-base_image#9
For those testing this with |
Since this is a top result in Google, and for newer Docker users this should really be combined into your existing RUN command if possible and at the very least squashed like this: RUN mkdir ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf As it will be one less cache layer and faster. |
* gpg key verification occasionally fails due to network issues when attempting to fetch keys. Combat this with two approaches: * Disable ipv6 testing in dirmngr.conf. [1] * Provide a fallback list of keyservers to pull from. [2] [1] usbarmory/usbarmory-debian-base_image#9 (comment) [2] tianon/gosu#39 (comment)
* gpg key verification occasionally fails due to network issues when attempting to fetch keys. Combat this with two approaches: * Disable ipv6 testing in dirmngr.conf. [1] * Provide a fallback list of keyservers to pull from. [2] [1] usbarmory/usbarmory-debian-base_image#9 (comment) [2] tianon/gosu#39 (comment)
fix gpg error. Solution reference usbarmory/usbarmory-debian-base_image#9
* gpg key verification occasionally fails due to network issues when attempting to fetch keys. Combat this with two approaches: * Disable ipv6 testing in dirmngr.conf. [1] * Provide a fallback list of keyservers to pull from. [2] [1] usbarmory/usbarmory-debian-base_image#9 (comment) [2] tianon/gosu#39 (comment)
I solved this by restarting the Docker daemon (host machine is Ubuntu Xenial) $ sudo service docker restart |
As mentioned above, this worked for me also: RUN mkdir ~/.gnupg But to overcome another, intermittent problem (name resolution failure, due to slow DNS response), Dockerfile also needed this -- RUN ping -c 10 download.redis.io && ping -c 10 pool.sks-keyservers.net |
It's subtle, but I needed the following, instead:
(In my case, the container already had the directory.) |
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
usbarmory/usbarmory-debian-base_image#9 (comment) Signed-off-by: Tamal Saha <[email protected]>
I'm having an issue importing the key:
Environment:
But it works with gpg2:
Related: rvm/rvm#3544
Feel free to close this issue. I'm mostly documenting the error.
The text was updated successfully, but these errors were encountered: