Skip to content

Instantly share code, notes, and snippets.

@notconscious
Created March 19, 2013 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notconscious/5197727 to your computer and use it in GitHub Desktop.
Save notconscious/5197727 to your computer and use it in GitHub Desktop.
Auto-update apt repository keys in 248 characters.
sudo apt-get update 2> /tmp/keymissing; for key in $(grep "NO_PUBKEY" /tmp/keymissing |sed "s/.*NO_PUBKEY //"); do echo -e "nProcessing key: $key"; gpg --keyserver subkeys.pgp.net --recv $key && gpg --export --armor $key | sudo apt-key add -; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment