How to Automatically Import Missing GPG Keys in Ubuntu

clip_image001

If you have missing GPG keys you’ll get an error like the one above in the screenshot if you are using Synaptic Package Manager and a similar one if you use the terminal. “Launchpad-getkeys” is a script that imports these missing keys automatically.

When adding PPAs to Ubuntu via “apt-add-repository” the PPA and its key will be imported. These GPG keys are a way to verify the packages in that PPA. But if you add a PPA when the Ubuntu key server is down the key will not be imported and the PPA will produce an error every time you try refreshing your packages. Ubuntu Forums user (blackgr) created a script called “launchpad-getkeys” that will import all missing keys automatically. To get this script on your computer, type these commands in a terminal and hit “Enter” after every line.

sudo apt-add-repository ppa:nilarimogard/webupd8

sudo apt-get update

sudo apt-get install launchpad-getkeys

Launchpad-getkeys is now installed. To import keys, just run:

sudo Launchpad-getkeys

clip_image008

As launchpad-getkeys says, you shouldn’t see any key errors anymore.

 

Omar Hafiz is a geeky Linux user who loves customizing Ubuntu to fit his personal style. Whether it's the login screen or his Gnome panels, he's got them tweaked to perfection.