Skip to content

Instantly share code, notes, and snippets.

@tsundokul
Last active January 20, 2023 15:37
Show Gist options
  • Save tsundokul/7930aea52513c5c0052b0448853a4bf7 to your computer and use it in GitHub Desktop.
Save tsundokul/7930aea52513c5c0052b0448853a4bf7 to your computer and use it in GitHub Desktop.
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead
# Remove legacy keyring
sudo rm /etc/apt/trusted.gpg
# Run apt update to get the deprecated gpg key hashes printed
sudo apt update
# Err:13 https://deb.torproject.org/torproject.org stretch InRelease
# The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 74A941BA219EC810
# replace [HASH] eg. F57D4F59BD3DF454
# [NAME] must be unique eg. tor.gpg, sublime.gpg etc
cd /tmp
curl 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x[HASH]' | gpg --dearmor > [NAME].gpg
sudo install -o root -g root -m 644 [NAME].gpg /etc/apt/trusted.gpg.d/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment