Sudo pacman-key --refresh-keys INFINITE LOOP

I noticed that when doing:

sudo pacman-key --refresh-keys

I get infinite loop. I can wait 30 minutes or longer and it still goes over and over and over, spamming with lots of errors:

gpg: download error ,,'' through WKD: No data
gpg: error reading key: No data
gpg: download error ,,'' through WKD: No data
gpg: error reading k ,,'' through WKD: No data
gpg: error reading key: No data

I found this topic with similar error:

So I deleted the database and the result was, that the command:

sudo pacman-key --refresh-keys

just stuck. I could wait for several minutes, without any output. So I deleted/renamed the database again and it went to the same old phase where it works infinitely.

I tried all of this:

sudo pacman -S archlinux-keyring manjaro-keyring  
sudo pacman-key --populate archlinux manjaro  
sudo pacman-key --refresh  
sudo pacman -Syyu

I also did:

sudo rm -f /var/lib/pacman/sync/*
pamac update --force-refresh

No improvement.

I noticed that in /etc/pacman.d/gnupg/ it was pubring.gpg that was creating issue, mainly I got a temp file pubring.gpg.tmp and there it was gone to see it again and again and again.

I’m sure that the refresh keys command should finish in a timely manner, so something is wrong. So far, I had to force stop it, because waiting was not doing anything (infinite loop). By loop, I mean that I saw this summary about what was added/disabled/trusted many times in a row, and it was never ending. I also saw the same keys, emails all over with various configurations, so I figured it is repeating the same over and over.

Look here

In my experience the --refresh only causes more problems. Offline install, init, populate.

1 Like

Thanks. I did what was suggested there, but since I haven’t used refresh keys, how do I know it worked? And what refresh keys command even does? I thought it is essential.

I decided to check refresh-keys anyway to see the result and it still generates infinite loop. Maybe I’m crazy and everything is OK, but… is it?

Well, i am not a key expert, but the keys are already in the packages (manjaro/arch-keyring) just static to a particular date. Note that these packages are frequently updated with the newest keys, but not everyday.
Refreshing from the internet, from many different servers, might update a key or two if a developer changed a key yesterday…but pulling from many servers has also its problems. Offline or poorly configured keyservers, timeouts…
So unless a key for a specific package that you need errors out on install i would not bother refreshing manually and stick to the automatic updates that occur every 3 months or even frequently. That is definitely enough for the base system.
The refresh part was actually removed from that very wiki page after a problems with the key packages at the beginning of July, so a lot of us went through that steps then and the wiki page was updated with correct steps.

So go through the procedure once more just to be sure the state of your keys is exactly the state of the packages (the last update was a week or two ago if i remember correctly), do not do the refresh part, and then a full system update with Syyu. If it works without errors you are fine.

p.s. pacman-key --refresh-keys and pamac --force-refresh are completely different things! I am talking about pacman-key --refresh (as i said, it was removed from the wiki for a reason)

Thanks. I let the refresh-keys run, and it finished, so it wasn’t an endless loop as I thought it was.
Still, the process takes an incredibly long time, which looks like an error. If there were some progress bar…

Anyway, I refreshed it like it was instructed on the site, so I guess, this should be OK for now.

Thank you again.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.