Ubuntu GPG key expired error - jinwooklim/my-exp GitHub Wiki

Reference

ubuntu 18.04 ์—์„œ package update๋ฅผ ํ•˜๋˜ ์ค‘, ์˜ˆ์ „์— ์„ค์น˜ํ•œ kubernetes-xenial ๋ถ€๋ถ„์—์„œ key error๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค.
๋”ฐ๋ผ์„œ, ์ด๋ฅผ ๊ฒฐํ•œ ๋ฐฉ๋ฒ•์ด๋‹ค.

Error

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 kubernetes-xenial 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 http://apt.kubernetes.io/dists/kubernetes-xenial/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.

or

W: An error occurred during the signature verification.
The repository is not updated and the previous index files will be used.
GPG error: http://packages.cloud.google.com/apt cloud-sdk-stretch InRelease:
The following signatures were invalid: EXPKEYSIG 3746C208A7317B0F
Google Cloud Packages Automatic Signing Key <[email protected]>

Solution

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