运行 apt update 时出现此错误:
Err:3 http://packages.cloud.google.com/apt cloud-sdk InRelease
The following signatures were invalid: EXPKEYSIG 6A030B21BA07F4FB Google Cloud Packages Automatic Signing Key <[email protected]> The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B57C5C2836F4BEB
我尝试了一些这样的解决方案,但没有奏效。我也试过这个,也没有工作:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B57C5C2836F4BEB
Executing: /tmp/apt-key-gpghome.mO2cvBYeEi/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 8B57C5C2836F4BEB
gpg: key 8B57C5C2836F4BEB: "gLinux Rapture Automatic Signing Key (//depot/google3/production/borg/cloud-rapture/keys/cloud-rapture-pubkeys/cloud-rapture-signing-key-2020-12-03-16_08_05.pub) <[email protected]>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
而且由于无论如何我都是在黑暗中拍摄,所以我也尝试了这个:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6A030B21BA07F4FB
Executing: /tmp/apt-key-gpghome.KaSWQmemRD/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 6A030B21BA07F4FB
gpg: key 6A030B21BA07F4FB: "Google Cloud Packages Automatic Signing Key <[email protected]>" 1 new signature
gpg: Total number processed: 1
gpg: new signatures: 1
我做错了吗?
这解决了我的问题:
这是官方记录的添加当前密钥的方法,如在https://cloud.google.com/sdk/docs/install#deb上找到的。