Skip to content
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

GPG Fetch key failed: gpg: keyserver receive failed: End of file #4256

Closed
raymond-liao opened this issue Dec 7, 2017 · 3 comments
Closed

Comments

@raymond-liao
Copy link

Environment:
macOS: 10.13.1

How did I install the gpg:
$ brew install gnupg gnupg2

GPG version:

$ gpg --version
gpg (GnuPG) 2.2.3
libgcrypt 1.8.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /Users/user/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

Error:

$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: keyserver receive failed: End of file

Tried with "hkp://pgp.mit.edu" also got the same error:

$ gpg --keyserver hkp://pgp.mit.edu --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: keyserver receive failed: End of file

I also tried:

$ \curl -sSL https://get.rvm.io | bash -s stable
Downloading https://github.com/rvm/rvm/archive/1.29.3.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.3/1.29.3.tar.gz.asc
gpg: Signature made Mon Sep 11 04:59:21 2017 CST
gpg:                using RSA key E206C29FBF04FF17
gpg: Can't check signature: No public key
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).

GPG signature verification failed for '/Users/raniys/.rvm/archives/rvm-1.29.3.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.3/1.29.3.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:

    gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

or if it fails:

    command curl -sSL https://rvm.io/mpapis.asc | gpg --import -

the key can be compared with:

    https://rvm.io/mpapis.asc
    https://keybase.io/mpapis

NOTE: GPG version 2.1.17 have a bug which cause failures during fetching keys from remote server. Please downgrade or upgrade to newer version (if available) or use the second method described above.

But when I trying gpg2 I got:

$ gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
-bash: gpg2: command not found
@mpapis
Copy link
Member

mpapis commented Jan 28, 2018

not sure why gpg2 is not available, but gpg points to V2 (probablythanks to bin.install_symlink "gpg2" => "gpg")

please try:

gpg --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

@vfonic
Copy link

vfonic commented Sep 11, 2018

Hi @mpapis!

I tried running the mentioned command, but I got this error message:

$ gpg --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: keyserver receive failed: No route to host

I installed gpg2 through brew:
brew install gpg # this installs gpg2 version 2.2.10

I also tried installing without checking the signature, but the check is automated, so that failed as well:

\curl -sSL https://get.rvm.io | bash -s stable
Downloading https://github.com/rvm/rvm/archive/1.29.4.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.4/1.29.4.tar.gz.asc
gpg: Signature made Sun Jul  1 21:41:26 2018 CEST
gpg:                using RSA key 62C9E5F4DA300D94AC36166BE206C29FBF04FF17
gpg: Can't check signature: No public key
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).

GPG signature verification failed for '/Users/vfonic/.rvm/archives/rvm-1.29.4.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.4/1.29.4.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:

    gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

or if it fails:

    command curl -sSL https://rvm.io/mpapis.asc | gpg --import -

the key can be compared with:

    https://rvm.io/mpapis.asc
    https://keybase.io/mpapis

NOTE: GPG version 2.1.17 have a bug which cause failures during fetching keys from remote server. Please downgrade or upgrade to newer version (if available) or use the second method described above.

(gpg2 is "command not found", like above)

@vfonic
Copy link

vfonic commented Sep 11, 2018

This finally worked:

$ curl -sSL https://rvm.io/mpapis.asc | gpg --import -
gpg: key 3804BB82D39DC0E3: 47 signatures not checked due to missing keys
gpg: key 3804BB82D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: public key of ultimately trusted key 76D78F0500D026C4 not found
gpg: public key of ultimately trusted key 00C18299FA3B13C4 not found
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   2  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 2u
$ \curl -sSL https://get.rvm.io | bash -s stable

Found it in this comment: #4215 (comment)
And I saw it also on the website: https://rvm.io/rvm/security

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants