自定义 repo NO_PUBKEY 错误

自定义 repo NO_PUBKEY 错误

从 apt-get update 中,我看到以下错误:

W: GPG error: http://repo.domain.com/apt ./ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9B2C8CCCEC30B0E8
W: The repository 'http://repo.domain.com/apt ./ 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.

这是我们的内部仓库,我正在尝试生成新密钥,因为 Ubuntu Xenial 不再允许摘要 SHA-1,但是在我重新生成密钥后出现上述错误,我该如何修复它?

答案1

找到解决方案:

1. go to repo server and repo directory
2. gpg --clearsign -o Release
3. rm Release.gpg
4. apt-ftparchive release . > Release
5. gpg --yes -abs -u $KEYNAME -o Release.gpg Release

不再有 NO_PUBKEY 抱怨!

相关内容