apt update google cloud EXPKEYSIG Err:3 公钥不可用

apt update google cloud EXPKEYSIG Err:3 公钥不可用

运行 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

我做错了吗?

答案1

这为我解决了这个问题:

curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

这是官方记录的添加当前密钥的方法,例如https://cloud.google.com/sdk/docs/install#deb

相关内容