昨天,我尝试在Ubuntu上安装ruby或更新rvm,今天在Mac OS上,但在两个地方的同一个地方都失败了:
$ rvm get head
Downloading https://get.rvm.io
Downloading https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc
Verifying /Users/bjelline/.rvm/archives/rvm-installer.asc
gpg: Signature made Sun Dec 30 11:44:46 2018 CET 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 '/Users/bjelline/.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 | 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.
-bash: return: _ret: numeric argument required
我已经尝试过两种获取公共密钥的版本:使用curl:
$ command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
gpg: key D39DC0E3: "Michal Papis (RVM signing) <mpapis@gmail.com>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
还要使用pgp2 --recv-keys:
$ gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: key D39DC0E3: "Michal Papis (RVM signing) <mpapis@gmail.com>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
请注意,双方都提到键D39DC0E3 ... 未更改。
那么,D39DC0E3出问题了吗?我怎么知道?
还是仅仅是错误的密钥?在 rvm get head 的输出中,找到链接
gpg: Signature made Sun Dec 30 11:44:46 2018 CET using RSA key ID 39499BDB
gpg: Can't check signature: No public key
RSA密钥ID 39499BDB 与密钥D39DC0E3 是否相同?我怎么知道?
答案 0 :(得分:2)
github上有一个问题对此进行了解释:
https://github.com/rvm/rvm/issues/4520
该错误似乎在提醒我以下事实: rvm的维护者已更改:新的维护者github.com/pkuczynski 使用另一个密钥进行签名。
我想信任这个新的维护者吗?然后我可以添加他的密钥:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
答案 1 :(得分:0)
它为我提供了新的密钥:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
谢谢bjelli!