GPG error message looks something like this
W: GPG error: http://ppa.launchpad.net maverick Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 976B5901365C5CA1
I forgot who i jack this command from but to get it setup just add this to your .bashrc file
#Auto Get Missing PPA LaunchPad GPG Keys
alias autokey='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 pool.sks-keyservers.net --recv $key && gpg --export --armor $key | sudo apt-key add -; done'
You can choose these mirror servers to get gpg keys, if the official one ever goes offline
keyserver.ubuntu.com
pool.sks-keyservers.net
subkeys.pgp.net
pgp.mit.edu
keys.nayr.net
keys.gnupg.net
wwwkeys.en.pgp.net #(replace with your country code fr, en, de,etc)
This has been submitted to my commandlinefu account also, come vote it up bitches =)
http://www.commandlinefu.com/commands/view/8186/auto-get-missing-launchpad-keys
For ppl that donno how to use Alias, is pretty simple just watch this sucker
You been officially pimp mama *pop collar*
No comments:
Post a Comment