在Debian下,按照官方的教程进行gpg和source的添加时,在apt update时会报错 NO_PUBKEY的错误
1、添加GPG
curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
2、UPDATE
sudo apt update
大概率情况下是报:
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 458CA832957F5868
Reading package lists... Done
W: GPG error: https://pkgs.tailscale.com/stable/debian bookworm InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 458CA832957F5868
--
出现这个问题,大部分是因为用tee生成文件的时候 ,权限不对,所以需要执行一下: chmod o+r /usr/share/keyrings/tailscale-archive-keyring.gpg
再进行sudo apt update,一切正常!