通常,您具有ftp,http和https的代理;我在这里看到hkp://作为URL;因此,不应通过纯http代理对其进行定向,从而导致通信失败。
使用此代替:
sudo apt-key adv --keyserver keyserver.ubuntu.com --keyserver-options http-proxy=http://localhost:3128 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886
至于系统更新,我建议使用APT代理,例如apt-cacher-ng
。
另一种方法是,使用浏览器在公共Web界面中搜索,例如在您的工作站上通过https://keyserver.ubuntu.com查找所需的密钥。
打开站点,您将获得一个表单。在这种情况下,我使用了“搜索字符串”“ Spotify”;然后选择“搜索”;它将列出几个键。
搜索结果页面中提到的签名/指纹:
pub 4096R/D2C19886 2015-05-28
Fingerprint=BBEB DCB3 18AD 50EC 6865 0906 13B0 0F1F D2C1 9886
uid Spotify Public Repository Signing Key <operations@spotify.com>
sig sig3 D2C19886 2015-05-29 __________ 2017-11-22 [selfsig]
sig sig 94558F59 2015-06-02 __________ __________ Spotify Public Repository Signing Key <operations@spotify.com>
我们看到这是我们感兴趣的条目。
因此,我们单击D2C19886,并在https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x13B00F1FD2C19886上看到一个带有密钥的页面。
Public Key Server -- Get "0x13b00f1fd2c19886 "
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.1.6
Comment: Hostname: keyserver.ubuntu.com
mQINBFVm7dMBEADGcdfhx/pjGtiVhsyXH4r8TrFgsGyHEsOWaYeU2JL1tEi+YI1qjpExb2Te
TReDTiGEFFMWgPTS0y5HQGm+2P3XGv0pShvgg9A6FWZmZmT+tymA2zvNrdpmKdhScZ52StPL
Fz9wsmXHG4DIKVuzgzuV4YxJ1i2wFtoVp8zT9ORu1BxLZ0IBwTvLRbaQGZ8DwXVAHak9cK91
Ujj6gJ1MJPohZLHH2BjrOjEl/I36jFUjK0AadznNzo08lLAi94qjtheJtuJD3IEOAlCkaknz
6vbEFpszLGlLD7GENMzJk46ObuJuvW5R2PkOU2U8jS0GaUD9Ou/SIdJ6vIdvjSs/ettc2w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hin6YjWsu57B
GixVThoMmxx3udsGAiYqt8buAANWbkUphrvtJuNCKkGym7psnS4Q5EnHPfvbYii9iAfBswX6
nZQlehva7aToN73elYL3opCArAxKAFx70bpGxb7T16KjKzkKS0a4iQ7xdbBGylb+AE/RhICa
+RM5tma2YnB3pZvFM/n0BNeYReCgvxkl1rqrB1KxmFHfGqjLkb2YAZ5RYnP3gEt+nbEWxL8F
O0Bhakn1RB3NqTC2oiQAUfh+66yUawUNkHRHlGAEzZAxvpfnf0hSJp734lyQZJs+zqXUAXa2
UmEZ6se62PgZRQIz5IbAVxSiGz4xIZs1yS36N2vZ34LFJa9o/HVk5OfpqZM0zjWwQIQN2b4O
BizL5r4h2Mi5BHUEyYMsDZn+txoJjPPYLolRlf31sqi5MJE+cbOAXSn8PC9k4i+hrbfqFzts
47+6xgCH3aXbhUkJh1CH/0/qEXfTPYTyayijm4rdvSBczzEORWGT5E38oV9h1eUqp4nVPg==
=/qip
-----END PGP PUBLIC KEY BLOCK-----
您在以“ ----- BEGIN”开头的行和以“ ----- END”结尾的行(包括这些行)之间进行剪切,然后粘贴到文件中,例如spotify.pgp
在要导入的目标服务器上键。(不要从这里剪切它,因为我在格式化时在每行之前添加了4个空格)
最后,将密钥导入服务器中:
$sudo apt-key add spotify.pgp
OK
http://keyserver.ubuntu.com/
在浏览器中访问时会发生什么?