LoginSignup
11
4

More than 3 years have passed since last update.

cloud.google.gpg の pubkey update

Posted at

概要

sudo apt updateしたらpubkeyの期限切れエラーが出たのでその対応方法を残す。

  • 実施時期: 2021年4月
  • OS: Ubuntu 18.4LTB
  • 備考: 大体一年前にGCP SDKをインストール済み

現象

sudo apt updateを実行すると下記の警告が表示されるようになった。

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.cloud.google.com/apt cloud-sdk InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B57C5C2836F4BEB NO_PUBKEY FEEA9169307EA071
W: Failed to fetch https://packages.cloud.google.com/apt/dists/cloud-sdk/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B57C5C2836F4BEB NO_PUBKEY FEEA9169307EA071
W: Some index files failed to download. They have been ignored, or old ones used instead.

"https://packages.cloud.google.com/apt cloud-sdk"

について、

"The following signatures couldn't be verified because the public key is not available"

とおっしゃっている。

対策

多分repositoryのpublic keyを更新すれば解決できると思って、ググってみると下記がヒット

そういえば、一年前くらいにSDKをインストールしたことを思いだした。
書かれてあるとおりに下記を実施し、もう一度update & upgradeを実行

curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get update && sudo apt-get install google-cloud-sdk
sudo apt update
sudo apt upgrade

解決!

11
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
4