Can't update due to no gpg key

I ran sudo parrot-upgrade and lost network connectivity. Tried to run it again and then got some errors. I tried to run sudo apt update thinking that that would fix the problem. It did not, unfortunately. I don’t mind having to reinstall parrot as this is a relatively new install, but I’d really like to learn how to fix the problem instead.

# parrot repository
# this file was automatically generated by parrot-mirror-selector
deb https://deb.parrot.sh/parrot/ rolling main contrib non-free
#deb-src https://deb.parrot.sh/parrot/ rolling main contrib non-free
deb https://deb.parrot.sh/parrot/ rolling-security main contrib non-free
#deb-src https://deb.parrot.sh/parrot/ rolling-security main contrib non-free

DISTRIB_ID=Parrot
DISTRIB_RELEASE=4.9
DISTRIB_CODENAME=rolling
DISTRIB_DESCRIPTION="Parrot 4.9"
PRETTY_NAME="Parrot GNU/Linux 4.9"
NAME="Parrot GNU/Linux"
ID=parrot
ID_LIKE=debian
VERSION="4.9"
VERSION_ID="4.9"
HOME_URL="https://www.parrotsec.org/"
SUPPORT_URL="https://community.parrotsec.org/"
BUG_REPORT_URL="https://community.parrotsec.org/"

Here’s’ there error:

Get:1 https://deb.parrot.sh/parrot rolling InRelease
Err:1 https://deb.parrot.sh/parrot rolling InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 363A96A5CEA9EA27
Get:2 https://deb.parrot.sh/parrot rolling-security InRelease
Err:2 https://deb.parrot.sh/parrot rolling-security InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 363A96A5CEA9EA27
Fetched 23.0 kB in 4s (6,073 B/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
2609 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://deb.parrot.sh/parrot rolling InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 363A96A5CEA9EA27
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://deb.parrot.sh/parrot rolling-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 363A96A5CEA9EA27
W: Failed to fetch https://deb.parrot.sh/parrot/dists/rolling/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 363A96A5CEA9EA27
W: Failed to fetch https://deb.parrot.sh/parrot/dists/rolling-security/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 363A96A5CEA9EA27
W: Some index files failed to download. They have been ignored, or old ones used instead.

Thanks!

Odd that you are running Parrot 4.9 when 4.10 has been out for awhile and 4.11 is on it’s way.

At least in Parrot 4.10 you would run

wget -q -O - https://deb.parrotsec.org/parrot/misc/parrotsec.gpg | sudo gpg --import

I fixed it! I had to run:

sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 363A96A5CEA9EA27

I can now update and upgrade.

1 Like

thank bro worked
update and upgrade now working

┌─[demiz@parrot]─[~]
└──╼ $

wget -q -O - https://deb.parrotsec.org/parrot/misc/parrotsec.gpg | sudo gpg --import

[sudo] password for demiz:
gpg: key 363A96A5CEA9EA27: “Parrot Project (2020-2022) [email protected]” not changed
gpg: Total number processed: 1
gpg: unchanged: 1
┌─[demiz@parrot]─[~]
└──╼ $sudo apt update
Hit:1 Index of /parrot/ rolling InRelease
Hit:2 Index of /debian/ stable InRelease
Hit:3 Index of /parrot/ rolling-security InRelease
Err:2 Index of /debian/ stable InRelease
The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 71EB474019940E11
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
57 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: Index of /debian/ stable InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 71EB474019940E11
W: Failed to fetch https://repo.protonvpn.com/debian/dists/stable/InRelease The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 71EB474019940E11
W: Some index files failed to download. They have been ignored, or old ones used instead.
┌─[demiz@parrot]─[~]

I still have the same problem even tho I have Keys

Have you tried #Spacefentionz’s method?

sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 363A96A5CEA9EA27

The repos you are using are different from the one who has created the thread. So this command should import the correct ones for you:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 71EB474019940E11

Notice this one is another keyserver because at keys.gnupg.net I haven’t found the one for Proton.

I was having the same issue recently and stumbled on this solution which solved my problem

To add these keys, run the following commands:

[chris@server ~]$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.QTeppiINUh --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
gpg: requesting key 437D05B5 from hkp server keyserver.ubuntu.com
gpg: key 437D05B5: public key "Ubuntu Archive Automatic Signing Key " imported
gpg: Total number processed: 1
gpg:               imported: 1
[chris@server ~]$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.77TqYGKU7b --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
gpg: requesting key C0B21F32 from hkp server keyserver.ubuntu.com
gpg: key C0B21F32: public key "Ubuntu Archive Automatic Signing Key (2012) " imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
[chris@server ~]$ 

:point_right: Fix apt-get update “the following signatures couldn’t be verified because the public key is not available” :: Chris Jean

If the keys that your system is missing differs, simply replace the key at the end of the above command with your key and run it.

It worked for me, I hope it helps you too.

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