GPG error: http://packages.cloud.google.com/apt EXPKEYSIG 3746C208A7317B0F

GPG error: http://packages.cloud.google.com/apt EXPKEYSIG 3746C208A7317B0F

在 Debian 上 运行 sudo apt update 时出现以下错误。

GPG error: http://packages.cloud.google.com/apt cloud-sdk-stretch InRelease:
The following signatures were invalid: EXPKEYSIG 3746C208A7317B0F

这是一个已知问题。

https://cloud.google.com/compute/docs/troubleshooting/known-issues#keyexpired

运行获取最新密钥的命令如下:

wget https://packages.cloud.google.com/apt/doc/apt-key.gpg \
    && apt-key add apt-key.gpg

curl -O https://packages.cloud.google.com/apt/doc/apt-key.gpg \
    && apt-key add apt-key.gpg

或.. 如果您喜欢没有无关文件的简单并且喜欢冒险:

curl -f https://packages.cloud.google.com/apt/doc/apt-key.gpg \
    | sudo apt-key add -