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: Can't check signature: public key not found #4573

Closed
knzudgt opened this issue Jan 6, 2019 · 7 comments
Closed

gpg: Can't check signature: public key not found #4573

knzudgt opened this issue Jan 6, 2019 · 7 comments
Milestone

Comments

@knzudgt
Copy link

knzudgt commented Jan 6, 2019

Description

I installed rvm in 2014 into Ubuntu 14.04 LTS with the following commands:

$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable

I never upgraded rvm, but today I was warned that I was using an older version of rvm while installing a new ruby. So I decided to upgrade. This is what happened:

marco@SATELLITE-L50-A-161:~ $ rvm get stable
Downloading https://get.rvm.io
Downloading https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc
Verifying /home/marco/.rvm/archives/rvm-installer.asc
gpg: Signature made dom 30 dic 2018 11:44:46 CET using RSA key ID 39499BDB
gpg: Can't check signature: public key not found
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 '/home/marco/.rvm/archives/rvm-installer' - 'https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.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.

I read #3110 but I did not install rvm as root user and I am not using rvm as root user.
I have gpg installed:

marco@SATELLITE-L50-A-161:~ $ gpg --version
gpg (GnuPG) 1.4.16

Steps to reproduce

  1. Install rvm version '1.29.3'. with the afore mentioned commands
  2. Try to upgrade rvm with rvm get stable
  3. upgrade fails

Expected behavior

rvm should upgrade

Actual behavior

rvm does not upgrade

Environment info (note that I uninstalled ruby 2.6.0)

marco@SATELLITE-L50-A-161:~ $ rvm info

ruby-2.6.0:

system:
uname: "Linux SATELLITE-L50-A-161 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux"
name: "Ubuntu"
version: "14.04"
architecture: "x86_64"
bash: "/bin/bash => GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)"
zsh: " => not installed"
remote_path: "ubuntu/14.04/x86_64"

rvm:
version: "1.29.3 (master)"
updated: "8 months 28 days 30 minutes 38 seconds ago"
path: "/home/marco/.rvm"
autolibs: "[enable] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."

ruby:
interpreter: "ruby"
version: "1.9.3p484"
date: "2013-11-22"
platform: "x86_64-linux"
patchlevel: "2013-11-22 revision 43786"
full_version: "ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]"

homes:
gem: "/home/marco/.rvm/gems/ruby-2.6.0"
ruby: "/home/marco/.rvm/rubies/ruby-2.6.0"

binaries:
ruby: "/usr/bin/ruby"
irb: "/usr/bin/irb"
gem: "/usr/bin/gem"
rake: ""

environment:
PATH: "/home/marco/.rvm/gems/ruby-2.6.0/bin:/home/marco/.rvm/gems/ruby-2.6.0@global/bin:/home/marco/.rvm/rubies/ruby-2.6.0/bin:/home/marco/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/marco/bin:/usr/local/heroku/bin:/home/marco/bin"
GEM_HOME: "/home/marco/.rvm/gems/ruby-2.6.0"
GEM_PATH: "/home/marco/.rvm/gems/ruby-2.6.0:/home/marco/.rvm/gems/ruby-2.6.0@global"
MY_RUBY_HOME: "/home/marco/.rvm/rubies/ruby-2.6.0"
IRBRC: "/home/marco/.rvm/rubies/ruby-2.6.0/.irbrc"
RUBYOPT: ""
gemset: ""

@wakkowarner
Copy link

Try
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
seems like @pkuczynski took over the signing.

@knzudgt
Copy link
Author

knzudgt commented Jan 8, 2019

Thanks @wakkowarner , it worked!
Now rvm says:

* It looks like some old stuff is laying around RVM, you can cleanup with: rvm cleanup all

Is it safe to run rvm cleanup all? I have never done it before

@pkuczynski
Copy link
Member

That's correct. I also fixed documentation on rvm.io

@pkuczynski pkuczynski added this to the rvm-1.29.8 milestone Jan 8, 2019
@techgique
Copy link

techgique commented Mar 18, 2019

@pkuczynski Has this been updated in the error message when signatures fail to match? We were updating from 1.29.3 and couldn't figure out what was wrong because the suggested command in the error message didn't include your key:

Downloading https://get.rvm.io
Downloading https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc
Verifying /usr/local/rvm/archives/rvm-installer.asc
gpg: Signature made Sun 30 Dec 2018 04:44:46 AM CST using RSA key ID 39499BDB
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 '/usr/local/rvm/archives/rvm-installer' - 'https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc'! Try to install GPG v2 and then fetch the public key:

    sudo gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

or if it fails:

    command curl -sSL https://rvm.io/mpapis.asc | sudo gpg2 --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.

/usr/local/rvm/scripts/functions/cli: line 243: return: _ret: numeric argument required

Edit: Nevermind, I see you responded to this concern in #3110 (comment)

@crifan
Copy link

crifan commented Aug 16, 2022

Finally following worked for me:

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

@danielricecodes
Copy link

Try gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB seems like @pkuczynski took over the signing.

This isn't working in October 2022.

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

gpg: keyserver receive failed: Server indicated a failure

@danielricecodes
Copy link

danielricecodes commented Oct 5, 2022

Finally following worked for me:

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

This did work - thankfully.

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

6 participants