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.

I notice the following:

  1. I add a ppa using add-apt-repository, for example the wine ppa, mozilla security, nvidia drivers, etc..

  2. When I go to the Update Manager and tell it to CHECK for updates it throws me a PPA error.

  3. To solve the error I add the same PPA again.

Why do I have to add the PPA again (This also can be done by adding the received key alone with apt-key) but why does this problem happen anyway.

UPDATE - I have to add two small details.

First that removing the previous PPA that has the GPG problem and then adding it up again will have the same effect as adding it twice since adding it again (without removing it first) will overwrite the same PPA. But still in the end you would have to add it twice.

Second using the Update Manager (Clicking on the Settings Button and going to the Software Sources) to add the PPA has the same problem as adding it in the terminal. In both cases you have to add it twice. I can confirm this for Nvidia ppa, Mozilla Security ppa, Wine ppa and any other PPA I started trying in 11.10. I have to add that this issue was not a problem in 11.04. It started with 11.10. Somehow there is some minor details that trying to add a PPA the first time does not trigger the key for it. Doing it a second time triggers the key and you can use the Update Manager (or any other updater) without having a warning popup saying something about a PPA problem.

UPDATE 2 - I have tested several PPA. They all have the same problem adding them via the GUI Software Sources or via the terminal add-apt-repository. I have to actually add them, run the update command in terminal or via gui and then add them again to solve the problem. Does not matter from where I add them or update or add them again.

share|improve this question
    
What error did it showed? and why did you not remove it first update the repos and add it back instead of adding it twice with add-apt-repository but shouldn't matter because it would only get overwritten you'd get something like imported:0 nothing added and what was the PPA? –  Uri Herrera Nov 27 '11 at 18:46
    
@Uri - Yes as you mentioned I have also done that. Ends with the same effect, solving the GPG problem BUT in both cases I end it up adding the PPA both times. In this case at least did not have to delete the previous PPA first since it gets overwritten. But still, the question remains about why does it have to be added twice to fix this problem. I will update my question since I also have something to say about using the Update manager as mentioned by david6 below in an answer. –  Luis Alvarado Nov 27 '11 at 23:21

4 Answers 4

up vote 2 down vote accepted

You can fix broken or bad GPG Keys by installing launchpad-getkeys from the WebUpd8 PPA. In terminal use the following commands:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install launchpad-getkeys

Since you seem to be having problems with Update Manager recognizing new PPAs, simply do the above steps without involving the Update Manager. Once you have installed the package, run the following command in your terminal:

sudo launchpad-getkeys

Wait for the program to finish. Your terminal should look similar to this:

enter image description here

As it says, you should have no more problems with missing GPG Keys. This method of fixing your PPA's keys is preferable to adding the same PPA twice, which can cause update problems of its own.

Hope this helps! Haha it's actually the second time today I've answered a question with this fix.

share|improve this answer
    
+1 because that is a very nice program. –  Luis Alvarado Nov 28 '11 at 7:19

When you use the command line, you are the one expected to resolve issues around missing keys, or other warnings and errors.

When you instead use the Update Manager, is will attempt to hide (or resolve) many of the issues that might affect you.

Just choose whichever method you are more comfortable with ..

MORE TECHNICAL: Some application's sources (:PPA, wget http://, etc.) will give intermediary errors as you (variously): add a repository, update sources, download PGP keys, and/or resolve additional dependencies. These are non-fatal errors, and may be reduced (or eliminated) by careful re-ordering of commands - although this is NOT technically required.

share|improve this answer

Not sure why you're getting this when using the terminal which has been the only way I've seen be successful in 11.10 (one time

Over the course of 11.10 dev probably did 100 or so installs, many times adding a ppa or 2 to test them. Software sources always would fail to add the key so stopped using & went exclusively with terminal command which always was successful.

(though i tended to use from a small group of ppa's so sampling was small

On a fairly fresh release install took a guess at the ppa you used for wine, went fine. Did you see this on your 1st command line attempt? (& similar on others

:~$ sudo add-apt-repository ppa:ubuntu-wine/ppa
You are about to add the following PPA to your system:
 Latest official WineHQ releases
Welcome to the Wine Team PPA.  Here you can get the latest available Wine betas for every supported version of Ubuntu.  
This PPA is managed by Scott Ritchie, and is a replacement for the WineHQ budgetdedicated.com repository used for Jaunty and earlier.
More info: https://launchpad.net/~ubuntu-wine/+archive/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.zzznKxc3Hx --trustdb-name /etc/apt/trustdb.gpg --keyring  /etc/apt/trusted.gpg --primary-keyring 
/etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv 883E8688397576B6C509DF495A9A06AEF9CB8DB0
gpg: requesting key F9CB8DB0 from hkp server keyserver.ubuntu.com
gpg: key F9CB8DB0: public key "Launchpad PPA for Ubuntu Wine Team" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

Edit: for rechecking as per comment, to start fresh

Open software sources, uncheck & then "remove" the entries. While in Software sources click on 'Authentication', find the relevant key & remove it.

To remove last traces open /etc/apt/sources.list.d/ as root & delete the relevant .list & if there .list.save files

For good measure then run a sudo apt-get update.

share|improve this answer
    
Correct. Exactly like that, right down to the last 1) there. After that, if I went to Update manager, did a Check on it, it would tell me "Hey man, the ppa for wine is wrong". So I would remove or readd the PPA and done. What other thoughts might you have about this problem. –  Luis Alvarado Nov 28 '11 at 4:11
    
Then i gather when you run the 2nd time (cli) that the last line would say "gpg: unchanged: 1". If so then maybe this is just on update manager & the key has actually been added correctly. What happens if after adding thru cli if you run an update in the terminal, *sudo apt-get update, are any errors shown or is it clean. I'll edit in answer how to completely start fresh on a ppa (still using wine as Ex. –  doug Nov 28 '11 at 6:54
    
When doing it in cli it also shows an error until the PPA is added a second time. –  Luis Alvarado Nov 28 '11 at 7:18

I add this as the answer since the above 3 did not work for me. Need to make enphasis on the "did not work for me" since they might work for others so they too are correct answers for others.

Anyway, the problem was actually solved about 2 to 3 days ago from an update that landed. Do not know which one but if yo update 11.10 up to the latest version the issues will be solved.

Just tested with a PC from scratch and the issues did not occurred after updating it to the latest.

share|improve this answer

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.