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

2023. 2. 2. 11:50Linux/Ubuntu

728x90
SMALL

- 에러 메세지

# 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

 

- 해결 (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

 

728x90
LIST