Skip to content

Instantly share code, notes, and snippets.

@netravnen
Last active September 17, 2017 20:52
Show Gist options
  • Save netravnen/4940d58f25182c7dc9f426ac3564680e to your computer and use it in GitHub Desktop.
Save netravnen/4940d58f25182c7dc9f426ac3564680e to your computer and use it in GitHub Desktop.
Fix missing GPG keys
#!/bin/bash
#
# Source: Shamelessly copied from https://askubuntu.com/a/280957
#
sudo apt-get update 2>&1 1>/dev/null | sed -ne 's/.*NO_PUBKEY //p' |
while read key; do
echo 'Processing key:' "$key"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys "$key"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment