Skip to content

Instantly share code, notes, and snippets.

@asamofal
Last active May 21, 2022 09:38
Show Gist options
  • Save asamofal/a294a3d3619afbae175dc03ab52af266 to your computer and use it in GitHub Desktop.
Save asamofal/a294a3d3619afbae175dc03ab52af266 to your computer and use it in GitHub Desktop.
[gpg] Download PUBKEY and use it in Ubuntu
1. Import key from the keyserver to local registry of gpg.
gpg --keyserver keyserver.ubuntu.com --recv-keys KEY_ID
2.Export key to gpg file.
gpg -a --export KEY_ID | gpg --dearmor > key.gpg
3. To add a key to keyrings for APT - move gpg file to /etc/apt/trusted.gpg.d
sudo mv key.gpg /etc/apt/trusted.gpg/APP_NAME.gpg
sudo chown root:root /etc/apt/trusted.gpg/APP_NAME.gpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment