Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Here is a story of a demented Ubuntu install.

One day, after being installed, loved and showing other OSes who's boss it decided to remove many of it's stored signatures/public keys - all on it's own!

The Ubuntu install coped well but it's user found it difficult to work around when trying to apt-get update.

If it was possible to update without the verification it's user decided to give it a go (acknowledging the risks) and.. well they both knew this was no way to go on.

So - to the internet, where all the other Ubuntu users reside!

breaking narrator character for a moment

The last apt-get update I ran gave this set of errors:

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http ://gb.archive.ubuntu.com maverick Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key

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 61E091672E206FF0 W: An 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 maverick Release: The following signatures were invalid: BADSIG 9DAD42D740C11E40 Launchpad Cloudsn Reporitory

W: An 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 maverick Release: The following signatures were invalid: BADSIG B725097B3ACC3965 Launchpad lffl

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 6D3B959722E58263 W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/maverick/Release

W: Failed to fetch http://ppa.launchpad.net/chuchiperriman/cloudsn/ubuntu/dists/maverick/Release

W: Failed to fetch http://ppa.launchpad.net/ferramroberto/vlc/ubuntu/dists/maverick/Release

W: Failed to fetch http://nightlies.videolan.org/build/intrepid-i386/arch/./Packages.gz 404 Not Found

W: Failed to fetch http://ppa.launchpad.net/nilarimongard/webupd8/ubuntu/dists/maverick/main/source/Sources.gz 404 Not Found

W: Failed to fetch http://ppa.launchpad.net/nilarimongard/webupd8/ubuntu/dists/maverick/main/binary-i386/Packages.gz 404 Not Found

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

I have read on ubuntuforums that I can go through each missing sig/key one-by-one and get it back. This seems quite long winded as a solution.

Is there a line of code to automatically find any and all missing keys? Or am I doomed to dig through these manually to become happy-ever-after?

share|improve this question

1 Answer 1

Launchpad-Getkeys (a small script packed in a .deb for easy installation) automatically imports all missing GPG keys.

To install and use it, open a terminal and copy/paste the following commands:

cd ~/Downloads
wget https://launchpad.net/~nilarimogard/+archive/webupd8/+files/launchpad-getkeys_0.3.1-1%7Ewebupd8%7Emaverick3_all.deb
sudo dpkg -i launchpad-getkeys*.deb
sudo launchpad-getkeys

The first command above changes the directory to your Downloads folder, the second downloads the .deb, third command installs the .deb and the last command runs "launchpad-getkeys" script which automatically imports all missing GPG keys.

If you're using a proxy, there are some things you need to change though so let me know if you need info on that too.

By the way, I see you have some other errors too, not just GPG keys. It looks like you have some broken PPA .list files (for instance I see you get a 404 not found error for the WebUpd8 PPA which can't be since the PPA exists all the way from Jaunty to Natty - maybe your Internet connection was down?).

share|improve this answer
    
Thanks so much for this info. I believe the GetKeys stuff worked although there are other unresolved errors as you said. I am not behind a proxy at the moment so that side of things is ok. Would you mind guiding me through the PPA issues? I have posted a Q about specifically about them here: http://askubuntu.com/questions/36115/repo-errors-when-doing-apt-get-update –  AFD Apr 20 '11 at 14:23
    
@AFD: Hmm I'll answer here since it seems it's not just that you're missing some keys but you also have invalid keys. I'm really not sure how to fix it but you can try the following: remove all the keys from Software Sources (Ubuntu Software Center > Edit > Software Sources, on the "Authentification tab") and then run launchpad-getkeys like explained in my answer above to get the keys back. –  Alin Andrei Apr 20 '11 at 15:18
    
Hi @Alin, thanks again for the help. I did as you suggested and removed all the keys and running getkeys again. It seemed to do it's job as with the first attempt, but again brings back errors when running apt-get update. One thing that may have been a cause or contributing factor - I ticked the box for 'proposed updates' from Ubuntu in the settings a while ago but unticked this when I realised it probably wasn't the best option in terms of stability. Could this have screwed things up? –  AFD Apr 21 '11 at 11:41
    
No, that can't be why you're getting those error... I've ran out of ideas :( –  Alin Andrei Apr 22 '11 at 21:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.