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'm tring to add a keys (on Kubuntu 12.04)

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys SOMEKEY

and I constantly get

gpg: requesting key 8AC93F7A from hkp server keyserver.ubuntu.com
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error

I thought my ports are closed. But the following should have made ports 80 and 11371 open:

iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 11371 -j ACCEPT

But I still get timed out.

Edit:

The following solves it:

sudo gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys SOMEKEY
share|improve this question
    
What version of Ubuntu is this? You need to add that so we can help you. –  belkinsa May 10 '12 at 10:41
    
Kubuntu 12.04. I had the same problems in 11.10 and 11.04 –  Adobe May 10 '12 at 10:43
    
I added the tags and edited your question with the info. –  belkinsa May 10 '12 at 10:47
    
@Adobe To mark this question technically 'answered'; Kindly add an 'answer' and 'accept' it. You may need to wait a day or two to be able to accept your own answer,though. –  Mahesh May 10 '12 at 11:53

2 Answers 2

up vote 8 down vote accepted

The following solves it:

sudo gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys SOMEKEY

Also if You see smth like that:

W: GPG error: http://archive.canonical.com jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 

Add the key appropriate:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 

(You can list all the bad keys You have)

Also: You can get a list of repos here:

 http://repogen.simplylinux.ch 

(but it is not recommended to add x-org updates - at least be sure to back up You xorg.conf)

Also: if see errors from previous repos - empty Your /etc/apt/sources.list.d dir.

share|improve this answer

given that you are not a newbie since you tried by configuring iptables via the command line: are you still sure that this is not caused by your internet connection? I had a similar problem by adding repos when connected to the university wireless network, that obviously kept most ports well closed. Even some (few) internet providers make this kind of jokes sometimes.

share|improve this answer
1  
Since most people don't seem to have such problems -- that must be due to my internet connection. sudo gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys SOMEKEY solves it and makes me satisfied. –  Adobe May 10 '12 at 11:27
    
This is really a comment, not an answer. With a bit more rep, you will be able to post comments. Kindly 'delete' this answer to help keep the site clean. –  Mahesh May 10 '12 at 11:49

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.