如何导入公钥?

Modified on: Sat, 09 Jun 2018 14:06:53 +0800

当我运行更新时,我收到以下错误。

GPG error: http://cran.wustl.edu maverick/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51716619E084DAB9

因此,我运行以下代码并收到以下错误消息:

$ gpg --keyserver subkeys.pgp.net --recv 51716619E084DAB9
gpg: requesting key E084DAB9 from hkp server subkeys.pgp.net
gpg: key E084DAB9: "Michael Rutter <marutter@gmail.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

如何设置有效的公钥或我可以采取哪些措施来解决此问题?

最佳答案

1)你可以试试这个:

gpg --keyserver keyserver.ubuntu.com --recv E084DAB9  

然后:

 gpg --export --armor E084DAB9 | sudo apt-key add - && sudo apt-get update  

2)如果“1”不起作用(你'并不孤单)然后你可以使用它:

“有些人报告使用[第一种方法]遇到了困难。问题通常与防火墙阻塞端口11371有关。另一种方法是在http://keyserver.ubuntu.com:11371/并将密钥复制到纯文本文件,比如key.txt。然后,将密钥提供给apt -key with

sudo apt-key add key.txt  

此处所述。

为了使这个具体案例变得容易:

搜索Michael Rutter带领我们:

Public Key Server -- Get ``0x51716619e084dab9 ''

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.0.10

mQENBEy9tcUBCACnWQfqdrcz7tQL/iCeWDYSYPwXpPMUMLE721HfFH7d8ErunPKPIwq1v4Cr
NmMjcainofbu/BfuZESSK1hBAItOk/5VTkzCJlzkrHY9g5v+XlBMPDQC9u4AE/myw3p52+0N
XsnBz+a35mxJKMl+9v9ztvueA6EmLr2xaLf/nx4XwXUMSi1Lp8i8XpAOz/Xg1fspPMRhuDAG
YDnOh4uH1jADGoqYaPMty0yVEmzx74qvdIOvfgj16A/9LYXk67td6/JQ5LFCZmFsbahAsqi9
inNgBZmnfXO4m4lhzeqNjJAgaw7Fz2zqUmvpEheKKClgTQMWWNI9Rx1L8IKnJkuKnpzHABEB
AAG0I01pY2hhZWwgUnV0dGVyIDxtYXJ1dHRlckBnbWF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ZRU9OIUufb5JjGNJ1Zz0Zp8hV/IPLoIv1OIocWov27YLcr6EnXuvXvU/MSm97YifdG9
UYCE99nHTioSM0Q3cgpu5EppVNrc232gyG2vlHzhsstNBx55cUmAX2fEzxuRipLS0iq4L0zU
Gdgdjn4noGDzGA==
=BF1w
-----END PGP PUBLIC KEY BLOCK-----

I)将其复制到txt文件:

gedit ~/Michael.txt  

II)运行此

sudo apt-key add ~/Michael.txt && rm ~/Michel.txt  

另外EvilPhoenix“有一个你可以安装的脚本,它可以让你执行这里描述的功能更简单的单行命令,它是Launchpad项目的一部分[他]开始,它的PPA位于这里
 它用Bash编写,但这足以满足它的要求
 它与所有版本的Ubuntu Lucid及其后续版本兼容。“

作者:Community,desgua

相关问答

添加新评论