Debian 8 上的 apt-get 更新升级到 9 存储库:签名错误

Debian 8 上的 apt-get 更新升级到 9 存储库:签名错误

我创建了自己的存储库,由我的 gpg 密钥签名。我家里有3台;新的 Debian 9,以及 2 个从 8 升级到 9 的 Debian。在我的一台计算机上 (8->9) - 我不知道为什么(另外 2 个安装正确了我的数据包)我收到了此错误(见下文)。我的问题是:如何清理 apt 缓存 - 但不清理 .deb 文件,仅列出我调用后得到的文件# apt-get update

我的错误:

一开始:很多行(在我的其他计算机上未显示)

> ...
> Ign:24 https://aaa.com/debian stretch/non-free all DEP-11 Metadata
> Ign:25 https://aaa.com/debian stretch/non-free DEP-11 64x64 Icons
> Ign:13 https://aaa.com/debian stretch/non-free all Packages Błąd:17
> https://aaa.com/debian stretch/non-free amd64 Packages  
> gnutls_handshake() failed: Public key signature verification has
> failed. Ign:18 https://aaa.com/debian stretch/non-free Translation-pl
> Ign:20 https://aaa.com/debian stretch/non-free Translation-en Ign:22
> https://aaa.com/debian stretch/non-free Translation-pl_PL Ign:23
> https://aaa.com/debian stretch/non-free amd64 DEP-11 Metadata Ign:24
> https://aaa.com/debian stretch/non-free all DEP-11 Metadata Ign:25
> https://aaa.com/debian stretch/non-free DEP-11 64x64 Icons ...

然后最后:

W: The repository 'https://aaa.com/debian stretch Release' does not have a Release file.
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.
E: Nie udało się pobrać https://aaa.com/debian/dists/stretch/non-free/binary-amd64/Packages  gnutls_handshake() failed: Public key signature verification has failed.

在我的sources.list中我有:

deb https://aaa.com/debian stretch non-free

我如何做我的回购? :

#!/bin/bash

cd repoX
rm -r ./debian
rm -r ./repo/dists
rm -r ./repo/pool
rm -r ./repo/db


mkdir -p debian
debsigs --sign=origin -k XXXXXXXX  ../DebianR/debian.deb
debsigs --sign=maint -k XXXXXXXX  ../DebianR/debian.deb
debsigs --sign=archive -k XXXXXXXX  ../DebianR/debian.deb
mv ../DebianR/debian.deb debian/debian-1.0_amd64.deb
reprepro --confdir ./repo/conf/ includedeb stretch ./debian/debian-1.0_amd64.deb

答案1

您必须将存储库的 gpg 密钥导入到 apt 中:

gpg --keyserver keyring.debian.org --recv-keys XXXXXXXX
gpg -a --export XXXXXXXX | sudo apt-key add -

应该XXXXXXXX真的是你的长的指纹(40 个字符,而不是 8 个),因为短指纹(8 个字符)很容易被欺骗。这是不是一个理论问题;那里已经具有欺骗性短指纹的假网络,例如邪恶32。如果您的短指纹被欺骗,并且您碰巧将短指纹添加到您的 apt-key 中,那么您基本上就允许其他人签署您的包。

还要确保您的密钥尚未过期。 (我自己最近也被咬过:-))

相关内容