Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apt-key deprecated, update docs for new location to store key #30911

Closed
zesty opened this issue Apr 22, 2022 · 12 comments · Fixed by #31348
Closed

apt-key deprecated, update docs for new location to store key #30911

zesty opened this issue Apr 22, 2022 · 12 comments · Fixed by #31348
Assignees

Comments

@zesty
Copy link

zesty commented Apr 22, 2022

On the website, Repository configuration should be updated from:

curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -

to:

curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo tee /etc/apt/trusted.gpg.d/hashicorp.asc

or something similar.

The current version now gives an error when doing apt update in Ubuntu 22.04 LTS:

W: https://apt.releases.hashicorp.com/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

relevant file: website/docs/cli/install/apt.mdx

@zesty zesty added bug new new issue not yet triaged labels Apr 22, 2022
@Naeim-Zarei
Copy link

Naeim-Zarei commented Apr 22, 2022

Hi all, is this documentation change still needed? If so, please let me know.

@crw crw removed bug new new issue not yet triaged labels Apr 22, 2022
@L1ghtn1ng
Copy link

yes this is needed and had to fix this on my ubuntu 22.04 install and this works perfectly but I would also recommend that having that remove the key first first then re-add it in the correct place afterwards to
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo tee /etc/apt/trusted.gpg.d/hashicorp.asc

but you will want to do sudo apt-key del E8A032E094D8EB4EA189D270DA418C88A3219F7B first as mentioned to remove it from the old location

@nvnputta
Copy link

I Will Work on this and submit a PR later

@laurapacilio
Copy link
Contributor

Hi All, I believe this community PR will solve this issue, let me know if folks have additional comments: #30956

@laurapacilio laurapacilio self-assigned this Apr 29, 2022
@L1ghtn1ng
Copy link

The location of where to store the key file is wrong

@jfouquat
Copy link

wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/apt_releases_hashicorp.gpg
sudo bash -c 'echo deb [arch=amd64 signed-by=/usr/share/keyrings/apt_releases_hashicorp.gpg] https://apt.releases.hashicorp.com/ $(lsb_release -cs) main >> /etc/apt/sources.list.d/terraform.list'

Just above, a draft, which works on my Ubuntu 22.04

@laurapacilio
Copy link
Contributor

Hi All,

Apologies for the very long delay on this! Thank you @L1ghtn1ng - you're right. We still need to fix the location. I'm going to open a PR with this fix for the page, based on @jfouquat input. Thank you both! I'll post it here for review once I've tested it.

I'm also going to alert others on my team, as I believe we'll need to also update the Downloads page and our getting started tutorials!

@robin-norwood
Copy link
Contributor

robin-norwood commented Jun 29, 2022

With two commands, as the current docs have, I think the correct new version is:

wget --no-verbose --output-document=- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor --output=/usr/share/keyrings/hashicorp-archive-keyring.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release --codename --short) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
  1. I'm calling it the hashicorp keyring instead of terraform, since I believe we use it for all products now.
  2. I used long argument names, per our style guide.

I tested the above on Ubuntu 22.04.

@laurapacilio
Copy link
Contributor

Hi All! Thanks to @robin-norwood - we've updated the commands and merged a PR for the APT page. We're also working with web dev to get these commands updated on the Terraform Downloads page as well.

Thanks again for calling this out!

@karlbateman
Copy link

karlbateman commented Jul 31, 2022

Consider updating the article (https://www.hashicorp.com/blog/announcing-the-hashicorp-linux-repository) too as this appears for search queries relating to the HashiCorp Linux repository.

@laurapacilio
Copy link
Contributor

@karlbateman - Thank you! I will pass this along to the team responsible for these blogs. We appreciate you flagging this for us!

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants