小编mar*_*ibs的帖子

为什么 apt GPG 密钥必须是全世界可读的?

当对 apt 存储库条目使用“签名者”选项时,如果密钥不可读,则 apt 会抛出错误。

例子:

deb [arch=amd64 signed-by=/etc/apt/keyrings/hashicorp.gpg] https://apt.releases.hashicorp.com jammy main

sudo chmod 660 /etc/apt/keyrings/hashicorp.gpg
sudo apt-get update  


https://apt.releases.hashicorp.com jammy InRelease  
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY DA418C88A3219F7B  

sudo chmod 664 /etc/apt/keyrings/hashicorp.gpg  
sudo apt-get update  
Hit:10 https://apt.releases.hashicorp.com jammy InRelease  
Run Code Online (Sandbox Code Playgroud)

为什么是这样?

apt

4
推荐指数
1
解决办法
592
查看次数

标签 统计

apt ×1