我们将一些自己的软件包作为 deb 托管在我们自己的存储库中。出于原型设计的目的,我们一直在“未经身份验证”的情况下运行。现在我们正在尝试更正确地做事并完成整个 GPG 的事情。我所尝试的,仅用于测试运行如下:
1) 制作密钥gpg-gen
~$ gpg --list-keys
/home/me/.gnupg/pubring.gpg
--------------------------------
pub 4096R/BBBBB39F 2017-03-09
uid Someone Somebody <[email protected]>
sub 4096R/129E9336 2017-03-09
(顺便说一句,SUB 在那里吗?)
2)aptly publish
...这会提示我输入该密钥的密码,因此此时它一定正在使用该密钥执行某些操作。
3)使用导出密钥gpg —export —armor > somefile.pubkey
4) 将一些 file.pubkey 复制到测试机器上
5)运行sudo apt-key add somefile.pubkey
sudo apt-key list
/etc/apt/trusted.gpg
--------------------
pub rsa4096 2017-03-09 [SC]
E51B E216 4658 FB8B 6E42 8A09 F9BC EF4C BBBB B39F
uid [ unknown] Someone Somebody <[email protected]>
sub rsa4096 2017-03-09 [E]
…
…
…
所以,它似乎已经进入了那里。子东西现在显示不一样了?
6)最后sudo apt-get update
:
~$ sudo apt-get update
Hit:1 http://ftp.us.debian.org/debian stretch InRelease
Hit:2 http://ftp.us.debian.org/debian stretch-updates InRelease
Hit:3 http://security.debian.org stretch/updates InRelease
Get:4 http://our.aptly.repo stretch InRelease [2317 B]
Ign:4 http://our.aptly.repo stretch InRelease
Fetched 2317 B in 9s (256 B/s)
Reading package lists... Done
W: GPG error: http://our.aptly.repo stretch InRelease: The following signatures were invalid: E51BE2164658FB8B6E428A09F9BCEF4CBBBBB39F
W: The repository 'http://our.aptly.repo stretch InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
我不明白这里发生了什么事。冒犯好像是有什么东西没有签名?我错过了什么步骤?