我正在为一些自定义的Raspberry Pi代码托pipe一个私人的Debian仓库。 我最初在Raspbian Jessie(版本8)上构build了软件,生成了一个GPG密钥,我用它来签署存储库,并在所有设备上运行sudo apt-key add ... ,以确保它们能够对我的身份进行身份validation库。 这工作得很好,直到最近我添加一些运行Raspbian Stretch(版本9)的新设备。 即使我向他们添加了完全相同的GPG密钥,下面是我运行sudo apt-get update时看到的输出:
W: GPG error: http://url.of.private.repo stable Release: The following signatures were invalid: 95F9B44CE35F40B759D59C2A77E4184C595493B1 W: The repository 'http://url.of.private.repo stable Release' 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.
但是,这只发生在较新的盒子上。 在还在运行Jessie的Pis上,我可以运行sudo apt-get update所有我不想要的authentication警告。
为什么Pis运行Stretch认为GPG密钥是无效的,即使它们都共享相同的密钥? 我可以在运行Stretch的盒子上生成一个新的密钥,但是我希望避免为每个Jessie盒子添加新的GPG密钥。 (现在我只有less数新的盒子在运行Stretch,而有200个盒子仍在运行Jessie。)我能做些什么来说服Stretch盒子,这个GPG键实际上是有效的?
根据要求,下面是两个平台上的sudo apt-get -o Debug::Acquire::gpgv=true update命令的输出:
根据评论:
SHA1被认为是弱的,因此Debian决定在2016年3月份改用更强大的哈希algorithm。
因此,如果操作APT存储库:弃用SHA1并切换(至less)到SHA256 。
请参阅这篇Debian wiki文章 ,了解有关推理的摘要,以及跟踪破碎/固定(上游)存储库的摘要。