apt-get update : ubuntu gpg public key error (https://apt.releases.hashicorp.com jammy InRelease)

Taegu KangTaegu Kang
1 min read
  • error message
# apt-get 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://apt.releases.hashicorp.com jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY xxxxxxxxxxxxxx
W: Failed to fetch https://apt.releases.hashicorp.com/dists/jammy/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY xxxxxxxxxxxxxx
  • resolution (terraform repository gpg publickey issue)
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
0
Subscribe to my newsletter

Read articles from Taegu Kang directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Taegu Kang
Taegu Kang