Issue with PGP keys during yay install

Hello,

I was having a issue with a install of a aur package with yay which gave me the following error

gpg: keyserver receive failed: No name
problem importing keys 

the package is yay -S protonvpn-cli without ng. I am wondering if there is any way to solve this issue.

Thanks,

theleapingfrog

Is that the full error output?

Can you resolve the address of the keyserver you are using?

You can also try setting a keyserver manually, e.g. keyserver.ubuntu.com tends to be fairly reliable.

Also, try editing the PKGBUILD and removing the spaces in the listed PGP key (line 16, https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=protonvpn-cli#n16). If that helps, report to the maintainer.

Looks like a keyserver issue.

You can manually import the key using a different keyserver.

1 Like

With regards to the full output error that is all it says above it just state what key need to be imported and by what it is required. Then about the keyserver I do not know which one it is currently trying to use.

Thanks for your reply.

1 Like

Try the above as @dalto recommended. You would just need to replace the key in the link with the one you need.

1 Like

I just tried but a error occurred. Could it be the keys are not there?

gpg --keyserver keyserver.ubuntu.com --recv-key A88441BD4864F95BEE08E63A71EB474019940E11
gpg: keyserver receive failed: No data

In note number five it states how to import key manually. However, I still have the issue when using yay for the install.It asks for the keys to be imported and the import still fails. I have the option to say no to the import also but i don’t know what that will do.

Thanks,

p.s Do i have to keep the public key I imported as a file around or can it be deleted once it is imported to pacman?

frog

I am not that comfert with the subject, but I read about reinstalling the keyring.
reinstalling archlinux-keyring ?

:eyes:

No that seems to harsh. I think I am missing something. I have imported the key already but when using yay it still wants to import the key and it still fails. Although I think I could skip the import in yay since I have already imported the key manually. However, if I do this I am not sure if the keys will get verified.

Did you do all of the pacman-key steps on that page? Also, I believe it needs to be run as root or with sudo.

Once it is working, you shouldn’t need the file anymore.

Yes I have done all the steps in the page. I have run them with sudo since the command prompts you to do so in order for them work.Except figer which doesnt require it. My main issue is if during the yay install I still have to import the keys.

Thanks

Since yay runs as your user you might need to import them for your user. Try this:

gpg --import ./public_key.asc

You need to be in the directory with your key file that you downloaded or give it the full path to the key.

Yes that seems to have done it now it did not even ask about them. How do i remove the keys I added to pacman?

Also to sum up the issue is that yay runs without sudo and pacman does and therefore the keys are stored in different places?

Thanks,

frog

Probably sudo pacman-key -d

I am not entirely sure how yay works in that case but I am guessing based on your results that it is using your local users keyring and not the one that is configured for pacman.

Almost.

If you install a package from the repositories listed in /etc/pacman.conf then pacman (or yay, or whatever, if you’re using it for installing repo packages) will use the pacman keyring (stored under /etc/pacman.d/gnupg).

If you download a PKGBUILD from the AUR, and it has a signature to validate the download, then makepkg (or yay, or whatever help you’re using) will use your local user’s keyring (stored under $HOME/.gnupg).

This is one reason the Arch wiki mentions it’s important to understand how package management works before using an AUR helper.

2 Likes

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