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

Photo by Daniel Dan on Unsplash

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

Linux/Ubuntu

·

1 min read

Play this article
  • 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