Skip to content

Instantly share code, notes, and snippets.

@luckman212
Created July 11, 2024 15:15
Show Gist options
  • Save luckman212/31e3e72021ab6de31fe231aadd7c2c40 to your computer and use it in GitHub Desktop.
Save luckman212/31e3e72021ab6de31fe231aadd7c2c40 to your computer and use it in GitHub Desktop.
apt-key command is deprecated.md

Links

  • [[netdata#Change install type of an existing installation]]
  1. Create new keyrings dir
    mkdir -p /etc/apt/keyrings && chmod 0755 /etc/apt/keyrings
  2. delete old legacy keys
    apt-key list
    apt-key del <last 8 chars of pub id>
    
  3. download the new / replacement key
    wget https://host.domain.tld/path/to/<keyfile>.<ext>
  4. verify that the filetype is PGP public key block Public-Key (old)
    file <keyfile>.<ext>

gpg supports a number of key formats, so if your key is in a different format, convert it by importing it into a temp keyring, then exporting it again:

gpg --no-default-keyring --keyring ./temp-keyring.gpg --import keyfile.ext
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export --output your-keyfile-name.gpg
rm temp-keyring.gpg

Note

Now that you have your converted key, do NOT add it to apt's trusted keystore (/etc/apt/trusted.gpg.d/). Instead, put it in /etc/apt/keyrings/.

  1. Move the key to /etc/apt/keyrings/

At this point, nothing has changed and apt doesn't know the key exists. The last step is to modify the specific .list file for the repository to tell apt where to find the key for that specific repo.

  1. Edit the file /etc/apt/sources.list.d/<example>.list, and in between deb and the url, add [signed-by=/etc/apt/keyrings/<your-keyfile-name>.gpg]

Real-world Example: netdata

This is a test. Obsidian does not scroll here when a link to the heading is clicked from another note!

Links

Support

Dashboards & Charts

About Local Dashboard

Install / Deploy

typical Linux install

curl https://get.netdata.cloud/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh

get the full command by visiting your room → Add Nodes

from ProxmoxVE host:

bash <(curl -Ss https://get.netdata.cloud/kickstart.sh)

Change install type of an existing installation

If you get an error: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F9177B5265F56346, you need to install the GPG key. See [[apt-key command is deprecated#Real-world Example netdata|here]] for an example.

@luckman212
Copy link
Author

Video repro:

obsidian-header-link-bug.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment