[solved] Yay cannot import key from keyserver: no data, no user ID

I tried to install linux-mainline but it took a really long time so I figured I’d try again later.

Now, I keep running into this wall:

$ yay -S linux-mainline
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1]  linux-mainline-6.2rc4-1

:: (1/1) Downloaded PKGBUILD: linux-mainline
  1 linux-mainline                   (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
:: (1/1) Parsing SRCINFO: linux-mainline

:: PGP keys need importing:
 -> ABAF11C65A2970B130ABE3C479BE3E4300411886, required by: linux-mainline
:: Import? [Y/n] 
:: Importing keys with gpg...
gpg: keyserver receive failed: No data
 -> problem importing keys

I’m not sure how I lost the keys, but I’ve tried every suggestion to import keys, update keyrings, etc.

gpg --keyserver keys.openpgp.org --recv-keys "ABAF11C65A2970B130ABE3C479BE3E4300411886"
gpg: key 79BE3E4300411886: no user ID
gpg: Total number processed: 1

yay just didn’t care and acted as if it was never imported. According to the arch wiki: https://wiki.archlinux.org/title/GnuPG#Configuration_files

yay is looking at /etc/gnupg which doesn’t exist on my system, the config file is actually in /etc/pacman.d/gpg.cfg

sudo ln -s /etc/pacman.d/gnupg /etc/gnupg

Now I get that same “No user id” error in yay.

$ yay -S linux-mainline
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1]  linux-mainline-6.2rc4-1

  1 linux-mainline                   (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
:: PKGBUILD up to date, Skipping (1/0): linux-mainline
  1 linux-mainline                   (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
:: (1/1) Parsing SRCINFO: linux-mainline

:: PGP keys need importing:
 -> ABAF11C65A2970B130ABE3C479BE3E4300411886, required by: linux-mainline
:: Import? [Y/n] 
:: Importing keys with gpg...
gpg: key 79BE3E4300411886: no user ID
gpg: Total number processed: 1
 -> problem importing keys

Looking into this more I found that this appears to be an ongoing issue:

Not really sure how to proceed at this point. Any tips or tricks would be welcome at this point.

2 Likes

Looks like I got it sorted out, sort of.

Turns out the keyserver I was using strips the user id for privacy reasons

gpg --keyserver hkp://pgp.rediris.es --recv-keys ABAF11C65A2970B130ABE3C479BE3E4300411886

That did the trick.

3 Likes

hi @lyam,

welcome to the purple universe :enos: :enos_flag: :penguin_face: :rocketa_purple:
glad you were able to solve your problem :+1:

2 Likes

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