Solve missing gpg key error **UPDATED/01/2010**

Post your How to's here

Solve missing gpg key error **UPDATED/01/2010**

Postby Blackwolf on Mon Feb 09, 2009 11:09 am

Update 05/01/2010
In many articles around the Internet about Ubuntu (including ours), they require you to add a PPA to get the latest version of programs. PPAs are very useful, but when missing PPA keys pile up, it's not exactly the easiest of situations to take care of.

To get a PPA key, you normally have to go the Terminal and type in a separate command for every missing PPA key, which might take a while if you have many PPA keys missing.

If only there was an easier way. Like, an automatic way to do the job for us.

Well there is. If you're missing any PPA keys, you can simply paste the Terminal command below to do the job of for you. ;grin

Code:
Code: Select all
    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



An even easier (and more automatic) way of getting missing PPA keys would be by running a little script called launchpad-update http://bazaar.launchpad.net/~oldman/%2B ... pad-update when you update your software sources.

First off download launchpad-update http://bazaar.launchpad.net/~oldman/%2B ... pad-update to the desktop, right click on the file, go to "Properties", tick the "Allow executing file as program" box in the "Permissions" tab and then run the command below:

Code: Select all
cd Desktop && sudo mv launchpad-update /usr/bin && echo "APT::Update::Pre-Invoke {\"if [ -x /usr/bin/launchpad-update ]; then /usr/bin/launchpad-update; fi;\"};" > 05ppa && sudo mv 05ppa /etc/apt/apt.conf.d/


Now everytime that you update your software sources, it will automatically get the missing PPA GPG keys for you. You can also run "launchpad-update" anytime if you wish to get the missing PPA GPG keys.


End Update


Solve missing gpg key error ie: W: GPG error: http://ppa.launchpad.net intrepid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 778978B00F7992B0
W: You may want to run apt-get update to correct these problems [/color]:o

I made a perl script that:
- Can detect and fix any launchpad PPA link in /etc/apt/sources.list
- Backs up the original /etc/apt/sources.list as /etc/apt/sources.list.backup
- Imports GPG keys for the links detected in /etc/apt/sources.list

Requirements:
- Administrative privileges
- Perl
- Internet connection
- HTML::Parser


Open a terminal Applications>accesories>terminal & paste this

Select all text in blue
sudo apt-get install libhtml-parser-perl

mkdir gpg-fix && cd gpg-fix

wget http://savvas.radevic.com/launchpad/change.tar.gz -O change.tar.gz

tar xzvf change.tar.gz

perl ./*.pl

cd ..

rm -Rf gpg-fix

sudo apt-get update
( wait for a while while it gets the keys ) coffee yum ;) ....then press enter when it shows apt get update ;) <BREW> ;)
Image
Ultimate Edition Beta Tester (x86_64)
Soprano E66 Custom>Intel Core i5-750 QuadCore
4GB DDR3-1333
P55A Gigabyte mainboard-with SATA3 & USB3.0 support
Samsung HD401LJ 400GB 16MB SATA11
nVidia GeForce GT240 1GB GDDR3 PCI-E
1TB Maxtor External Hard Drive


............... PLEASE DO NOT CLICK THE PICTURE BELOW.................
Image
Ultimate Edition Australia* Ultimate Edition Israel* Ultimate Facebook
User avatar
Blackwolf
Site Admin
 
Posts: 2564
Joined: Sun Apr 27, 2008 5:31 am
Location: Burnie. Tasmania. (LONGITUDE. 145°. LATITUDE. 41°)
Operating System: Ultimate Edition Beta Tester

Re: Solve missing gpg key error

Postby stanca on Tue Feb 10, 2009 9:21 pm

Very good Nick,worked to me:
Screenshot.png
Screenshot-1.png
:D Thanks!You're a real treasure for us. <BREW>
ASrock G31M-S Motherboard,
Cpu Intel Celeron Dual-core 2.5Ghz 64bit,
DDRAM 4GB DDR2 800MHz Kingmax,
Nvidia Geforce 8600 GS 512mb(1GB turbocache') PCI-E 16X.
Dual-boot Ultimate Edition 2.8 Alpha2 x86_64/Windows 7 Ultimate x86.
Linux user # 492560.
"This is Linux land!In silent nights you can hear Windows machines rebooting!..."
http://www.youtube.com/user/laur1969 http://stanca-ultimateeditionromania.blogspot.com/#

Image
Image
Image
Image
User avatar
stanca
Site Admin
 
Posts: 1497
Joined: Sun Nov 02, 2008 4:48 pm
Location: Bucharest,Romania,EU,44'25"N,26'07"E.
Operating System: Ultimate Edition 2.8 Alpha 64 BIT

Re: Solve missing gpg key error

Postby jnalli on Thu Feb 19, 2009 7:42 pm

I am getting the same error for edevelop.org. Do you have a solution to that? I was trying to install e17.
Ultimate Edition 2.6 32 and 64-bit.
775A socket Gigabyte MB
Intel Dual Core @ 3.4 GHz (Custom built)
Nvidia Geforce 6800 GS
2 Gb RAM
250 Gb SATA drive
User avatar
jnalli
U.E. Master
U.E. Master
 
Posts: 158
Joined: Wed Jul 23, 2008 9:07 am
Location: Phoenix, AZ
Operating System: Ultimate Edition 2.7 64 BIT

Re: Solve missing gpg key error

Postby Blackwolf on Sat Feb 21, 2009 10:50 am

Thanks to http://e17blog.tuxfamily.org/e17blog_en.php/post/2007/08/09/E17-repository-for-Ubuntu-Feisty-Fawn

Found it by Googling "gpg key for edevelop.org" ;)

jnalli wrote:I am getting the same error for edevelop.org. Do you have a solution to that? I was trying to install e17.



Public Key
The packages are signed. apt verifies that the packages signatures are correct. If you do not want to receive warnings when installing or upgrading packages from e17.dunnewind.net repository, you must import this public key inside the APT system, using the following commands:

wget http://lut1n.ifrance.com/repo_key.asc

sudo apt-key add repo_key.asc


Repository
To publish the file sources.list, you can use nano or your preferred editor. For example Gedit if you use the Gnome environment (in the order to replace sudo nano - w by gksudo gedit), Kate if you use environment KDE (in the order replace sudo nano - w by kdesu kate).

Next we will add the needed repository for E17 to our apt sources list. In a terminal copy and paste the following command:

sudo nano -w /etc/apt/sources.list

Now you need to add the following lines to the end of your apt sources list:


## Elbuntu
deb http://e17.dunnewind.net/ubuntu feisty e17

Save with CTRL + o, exit the file with CTRL + x.

Now we need to update source list using the following command:

sudo aptitude update
Image
Ultimate Edition Beta Tester (x86_64)
Soprano E66 Custom>Intel Core i5-750 QuadCore
4GB DDR3-1333
P55A Gigabyte mainboard-with SATA3 & USB3.0 support
Samsung HD401LJ 400GB 16MB SATA11
nVidia GeForce GT240 1GB GDDR3 PCI-E
1TB Maxtor External Hard Drive


............... PLEASE DO NOT CLICK THE PICTURE BELOW.................
Image
Ultimate Edition Australia* Ultimate Edition Israel* Ultimate Facebook
User avatar
Blackwolf
Site Admin
 
Posts: 2564
Joined: Sun Apr 27, 2008 5:31 am
Location: Burnie. Tasmania. (LONGITUDE. 145°. LATITUDE. 41°)
Operating System: Ultimate Edition Beta Tester

Re: Solve missing gpg key error

Postby jnalli on Thu Feb 26, 2009 4:55 am

after all this i still get this

ailed to fetch http://e17.dunnewind.net/ubuntu/dists/f ... ackages.gz 404 Not Found
Some index files failed to download, they have been ignored, or old ones used instead.
Ultimate Edition 2.6 32 and 64-bit.
775A socket Gigabyte MB
Intel Dual Core @ 3.4 GHz (Custom built)
Nvidia Geforce 6800 GS
2 Gb RAM
250 Gb SATA drive
User avatar
jnalli
U.E. Master
U.E. Master
 
Posts: 158
Joined: Wed Jul 23, 2008 9:07 am
Location: Phoenix, AZ
Operating System: Ultimate Edition 2.7 64 BIT

Re: Solve missing gpg key error

Postby tuxsax on Thu Feb 26, 2009 9:47 am

I'll share with you my "manual" solution for any given repo GPG Key related errors such as the followings:
W: GPG error: http://dl.google.com testing Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991
W: GPG error: http://apt.debianchile.org unstable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2C392DFEEFD17969
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: http://ppa.launchpad.net intrepid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 778978B00F7992B0

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: http://ppa.launchpad.net intrepid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 60D11217247D1CFF

W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 632D16BB0C713DA6
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: http://packages.medibuntu.org intrepid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2EBC26B60C5A2783

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: http://wine.budgetdedicated.com intrepid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 58403026387EE263

W: Failed to fetch http://ppa.launchpad.net/project-neon/u ... id/Release

W: Failed to fetch http://ppa.launchpad.net/openoffice-pkg ... id/Release

W: Failed to fetch http://ppa.launchpad.net/googlegadgets/ ... ackages.gz 404 Not Found

W: Failed to fetch http://packages.medibuntu.org/dists/intrepid/Release

W: Failed to fetch http://wine.budgetdedicated.com/apt/dis ... id/Release

W: Some index files failed to download, they have been ignored, or old ones used instead.

Copy/Paste the whole "errors" to a text file called "errors.txt" then run the following command: (ONE LINE!)
Code: Select all
for i in `cat errors.txt | grep PUBKEY | awk -F "PUBKEY" '{print $2}'` ; do gpg --keyserver keyserver.ubuntu.com --recv-keys $i ; gpg --export --armor $i | sudo apt-key add - ; done

You should get an output similar to this one:
gpg: keyring `/home/ziv/.gnupg/secring.gpg' created
gpg: keyring `/home/ziv/.gnupg/pubring.gpg' created
gpg: requesting key 7FAC5991 from hkp server keyserver.ubuntu.com
gpg: /home/ziv/.gnupg/trustdb.gpg: trustdb created
gpg: key 7FAC5991: public key "Google, Inc. Linux Package Signing Key <linux-packages-keymaster@google.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1
OK
gpg: requesting key EFD17969 from hkp server keyserver.ubuntu.com
gpg: key EFD17969: public key "Debian Chile Archive Signing Key <aptmaster@debianchile.org>" imported
gpg: Total number processed: 1
gpg: imported: 1
OK
gpg: requesting key 0F7992B0 from hkp server keyserver.ubuntu.com
gpg: key 0F7992B0: public key "Launchpad PPA for Project Neon" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
gpg: requesting key 247D1CFF from hkp server keyserver.ubuntu.com
gpg: key 247D1CFF: public key "Launchpad PPA for OpenOffice.org Scribblers" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
gpg: requesting key 0C713DA6 from hkp server keyserver.ubuntu.com
gpg: key 0C713DA6: public key "Launchpad PPA for Fabien Tassin" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
gpg: requesting key 0C5A2783 from hkp server keyserver.ubuntu.com
gpg: key 0C5A2783: public key "Medibuntu Packaging Team <admin@lists.medibuntu.org>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1
OK
gpg: requesting key 387EE263 from hkp server keyserver.ubuntu.com
gpg: key 387EE263: public key "Scott Ritchie <scott@open-vote.org>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1
OK

Now run again
Code: Select all
sudo apt-get update

Buh Bye keyring errors!
______________________________
Two things I love: Linux and my sax



Motherboard: ASUSTeK M2N-SLI DELUXE - Chipset NVIDIA nForce 570 SLI Revision A1
CPU: AMD Athlon64 X2 Dual Core Processor 4800+ Socket AM2 (940)
RAM: 2048MB (1024x2) Kingston DDR2 667
Video: NVIDIA GeForce 7600 GT 256MB
Hardisks: WD SATA II 16M Cache 320GB / WD SATA II 8Mb Cache 250GB

User avatar
tuxsax
Site Admin
 
Posts: 792
Joined: Sat Apr 26, 2008 9:15 am
Location: Israel
Operating System: Ultimate Edition 2.8 Alpha 64 BIT

Re: Solve missing gpg key error

Postby nesnfsn on Sun Mar 01, 2009 8:20 pm

tuxsax:

Ran your script. Thanks. Took care of most of my errors, however, still got the following error message toward the end:

Get:14 http://ppa.launchpad.net intrepid/main Packages [7252B]
Hit http://ppa.launchpad.net intrepid/main Packages
Ign http://wine.budgetdedicated.com intrepid/main Packages
Err http://ppa.launchpad.net intrepid/main Packages
404 Not Found
Hit http://ppa.launchpad.net intrepid/main Packages
Hit http://ppa.launchpad.net jaunty/main Packages
Hit http://ppa.launchpad.net intrepid/main Packages
Hit http://wine.budgetdedicated.com intrepid/main Packages
Hit http://packages.medibuntu.org intrepid/non-free Packages
Hit http://packages.medibuntu.org intrepid/free Sources
Hit http://packages.medibuntu.org intrepid/non-free Sources
Fetched 8875B in 1s (6549B/s)
W: Failed to fetch http://ppa.launchpad.net/googlegadgets/ ... ackages.gz 404 Not Found

E: Some index files failed to download, they have been ignored, or old ones used instead.


Any other suggestions to complete the fix????
Ultimate Edition 2.6 Gamers - 64-bit Installation / iPC OS X 10.5.6
8 Gb DDR2 800Mhz RAM / Galaxy 9600GT 1Gb DDR2 RAM Graphics Card
E8400 Core 2 Due CPU 3.0 Ghz / Thermalright HR-01 Plus Heatsink / Noctua NFP-12
WD SATA-II 1.0 TB Hard Drive / Asus DVD-ROM / Seasonic M-12 Power Supply
nesnfsn
U.E. Pro
U.E. Pro
 
Posts: 33
Joined: Sun Oct 28, 2007 1:40 am
Location: Sunny South Florida
Operating System: Ultimate Edition 2.6 64 BIT

Re: Solve missing gpg key error

Postby michealm on Tue Mar 03, 2009 10:46 pm

im still having this problem and i just installed 2.1 today ive tried 2 different solutions and nothing worked
michealm
U.E. Newbie
U.E. Newbie
 
Posts: 3
Joined: Tue Mar 03, 2009 10:37 pm
Operating System: Ultimate Edition 2.8 Alpha 64 BIT

Re: Solve missing gpg key error

Postby tuxsax on Wed Mar 04, 2009 9:51 pm

nesnfsn wrote:tuxsax:

Ran your script. Thanks. Took care of most of my errors, however, still got the following error message toward the end:

Get:14 http://ppa.launchpad.net intrepid/main Packages [7252B]
Hit http://ppa.launchpad.net intrepid/main Packages
Ign http://wine.budgetdedicated.com intrepid/main Packages
Err http://ppa.launchpad.net intrepid/main Packages
404 Not Found
Hit http://ppa.launchpad.net intrepid/main Packages
Hit http://ppa.launchpad.net jaunty/main Packages
Hit http://ppa.launchpad.net intrepid/main Packages
Hit http://wine.budgetdedicated.com intrepid/main Packages
Hit http://packages.medibuntu.org intrepid/non-free Packages
Hit http://packages.medibuntu.org intrepid/free Sources
Hit http://packages.medibuntu.org intrepid/non-free Sources
Fetched 8875B in 1s (6549B/s)
W: Failed to fetch http://ppa.launchpad.net/googlegadgets/ ... ackages.gz 404 Not Found

E: Some index files failed to download, they have been ignored, or old ones used instead.


Any other suggestions to complete the fix????


Edit the sources list file and remove the erroneous repos, you must have two different repos for google, the one with the gadgets isn't necessary as long as you keep the general one ( deb http://dl.google.com/linux/deb/ stable non-free )
______________________________
Two things I love: Linux and my sax



Motherboard: ASUSTeK M2N-SLI DELUXE - Chipset NVIDIA nForce 570 SLI Revision A1
CPU: AMD Athlon64 X2 Dual Core Processor 4800+ Socket AM2 (940)
RAM: 2048MB (1024x2) Kingston DDR2 667
Video: NVIDIA GeForce 7600 GT 256MB
Hardisks: WD SATA II 16M Cache 320GB / WD SATA II 8Mb Cache 250GB

User avatar
tuxsax
Site Admin
 
Posts: 792
Joined: Sat Apr 26, 2008 9:15 am
Location: Israel
Operating System: Ultimate Edition 2.8 Alpha 64 BIT

Re: Solve missing gpg key error

Postby slingshotsuicide on Thu Mar 05, 2009 9:23 pm

[quote="tuxsax"]I'll share with you my "manual" solution for any given repo GPG Key related errors such as the followings:
[quote]

That's what I'm talking about! Thanx. <BREW>
The glass is neither half empty nor half full. It is functioning 100% effectively @ 50% capacity. It is approximately 75% efficient. I suggest fitting a lid of some sort.
Mine: MSI L725
Intel M740 1.73GH
nVidia Go 6600
2GB
160G pata Seagate
Intel ProWireless2200
Hers: HP dv 6000
AMD
3G
250Gb
Vista Office 2k7Ultimate (forced to play nice together with Blackboard OMFG!! Thank Moz for Firefox Don't f&*%ing ask)
Ours
HP C6280 Networked
Linksys WRT110
User avatar
slingshotsuicide
U.E. Pro
U.E. Pro
 
Posts: 42
Joined: Fri Nov 21, 2008 4:07 pm
Location: Saginaw, MI
Operating System: Ultimate Edition 2.8 Alpha 64 BIT

Next

Return to How To's (Do not post questions please)

Who is online

Users browsing this forum: No registered users and 1 guest