You are not logged in.

#1 2022-08-04 09:17:18

Hainowdai
Member
Registered: 2020-05-26
Posts: 2

Pacman stuck on importing pgp key

Hello, I recently tried to update my system, but pacman keeps on hanging on trying to import a pgp key from my custom repository which holds all my AUR packages.

sudo pacman -Syu
[sudo] password for : 
error: custom: key "42C5AA62EF3F552D8E754F6D637B94906FC15B51" is unknown
:: Import PGP key 42C5AA62EF3F552D8E754F6D637B94906FC15B51? [Y/n] Y
error: key "42C5AA62EF3F552D8E754F6D637B94906FC15B51" could not be looked up remotely
:: Synchronizing package databases...
 testing is up to date
 core is up to date
 extra is up to date
 community                   6.7 MiB  5.93 MiB/s 00:01 [#############################] 100%
 multilib is up to date
 custom                     60.0 KiB  58.6 MiB/s 00:00 [#############################] 100%
error: custom: key "42C5AA62EF3F552D8E754F6D637B94906FC15B51" is unknown
:: Import PGP key 42C5AA62EF3F552D8E754F6D637B94906FC15B51? [Y/n] Y
error: key "42C5AA62EF3F552D8E754F6D637B94906FC15B51" could not be looked up remotely
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))

The only way I've gotten pacman to work is to completely disable my custom repository in pacman.conf. I've also tried updating with pacman -S archlinux-keyring and attempting to import the key from several keyservers, but I'm always met with the same problem. I even searched up the key on google to see if I'd find anyway to import the key, but I couldn't find it at all.

Last edited by Hainowdai (2022-08-04 09:19:08)

Offline

#2 2022-08-04 09:24:52

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: Pacman stuck on importing pgp key

https://wiki.archlinux.org/title/Pacman … ing_pacman

https://wiki.archlinux.org/title/Pacman … icial_keys

should help with either disabling the check or adding your custom key.

Offline

#3 2022-08-04 09:55:06

hoffer
Banned
From: Latvia
Registered: 2022-02-07
Posts: 13
Website

Re: Pacman stuck on importing pgp key

sudo pacman -Sy archlinux-keyring

then  -Syu

Last edited by hoffer (2022-08-04 09:55:18)


https://ugjka.net

I'm ugjka, I lost my account

Offline

#4 2022-08-04 10:19:11

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,932
Website

Re: Pacman stuck on importing pgp key

@hoffer it's their custom key of their private repo. It's unlikely to be in the official Arch Linux keyring.

@OP: If you did not publish your public PGP key on any keyserver, you must transfer it to the system in question by other means. You can e.g. export it on your build system, where you presumably sign the custom packages and repo, into a text file, rsync it to the target system and import it there using pacman-key. While at it, don't forget to set an appropriate trust level an sign it locally.

Last edited by schard (2022-08-04 10:22:48)

Offline

#5 2022-08-04 20:50:49

Hainowdai
Member
Registered: 2020-05-26
Posts: 2

Re: Pacman stuck on importing pgp key

Okay, I've been able to set my SigLevel for my custom repository to Never in pacman.conf as per the info that @V1del gave, which does fix the error. However, I'm not sure if this is the best or safest solution by any means. Is there anyway to remove the keycheck for a particular key or to obtain a keyfile from a package? To provide context, this error occurred after I tried to install the discord-screenaudio package and ran makepkg -si as pacman wouldn't install it because of the invalid key. Not exactly sure what's happening, but I think the key from this package is causing problems on my system. As I mentioned, attempting to use gpg --recv-key yields nothing for the key.

Last edited by Hainowdai (2022-08-04 20:53:46)

Offline

#6 2022-08-04 21:20:47

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Re: Pacman stuck on importing pgp key

Assuming 42C5AA62EF3F552D8E754F6D637B94906FC15B51 is signature for your local signing key did you try the local file method from V1del's second link?

Offline

Board footer

Powered by FluxBB