Skip to content

Instantly share code, notes, and snippets.

@alsunseri
Created August 25, 2023 18:31
Show Gist options
  • Save alsunseri/4f77f4551008f124c2e869e2d2194589 to your computer and use it in GitHub Desktop.
Save alsunseri/4f77f4551008f124c2e869e2d2194589 to your computer and use it in GitHub Desktop.
fix apt-key deprecation ( Key is stored in legacy trusted.gpg keyring warning/error )
Fix apt warnings about keys "stored in legacy trusted.gpg keyring"
Add a key to /etc/apt/trusted.gpg.d/
For instance with sysdig , the key is in ascii armored format and available at https://download.sysdig.com/
this simple command will immediately get apt to stop complaining:
wget -qO- https://download.sysdig.com/DRAIOS-GPG-KEY.public | sudo tee /etc/apt/trusted.gpg.d/sysdig.asc
If the file is in "GPG key public ring" binary OpenPGP format then use .gpg extension.
Also See note in apt-key(8) :
" Instead of placing keys into the /etc/apt/trusted.gpg.d directory,
you can place them anywhere on your filesystem by using the Signed-By
option in your sources.list and pointing to the filename of the key. "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment