Apt update fails with NO_PUBKEY error

Hi!

I noticed this yesterday, when I do apt update it fails for one repository that I didn’t add by hand, so I’m guessing it came from my a04 image.

root@clockworkpi-a04:~# apt update
Hit:1 http://ports.ubuntu.com hirsute InRelease
Hit:2 http://ppa.launchpad.net/saiarcot895/chromium-dev/ubuntu hirsute InRelease
Hit:3 http://ports.ubuntu.com hirsute-security InRelease
Hit:4 http://ports.ubuntu.com hirsute-updates InRelease
Hit:5 http://ports.ubuntu.com hirsute-backports InRelease
Get:6 https://raw.githubusercontent.com/clockworkpi/apt/main/debian stable InRelease [2,555 B]
Hit:7 http://armbian.12z.eu/apt hirsute InRelease
Err:6 https://raw.githubusercontent.com/clockworkpi/apt/main/debian stable InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4933060A00E71269
Fetched 2,555 B in 3s (938 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://raw.githubusercontent.com/clockworkpi/apt/main/debian stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4933060A00E71269
W: Failed to fetch https://raw.githubusercontent.com/clockworkpi/apt/main/debian/dists/stable/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4933060A00E71269
W: Some index files failed to download. They have been ignored, or old ones used instead.

So how and where would I get that key?

I also seem to remember that the repository used to work, but I’m not sure.

It’s in /etc/apt/sources.list.d/clockworkpi.list:

root@clockworkpi-a04:~# cat /etc/apt/sources.list.d/clockworkpi.list
deb https://raw.githubusercontent.com/clockworkpi/apt/main/debian/ stable main
apt-key adv --recv-keys 4933060A00E71269

Does not help and it’s also deprecated and the manpage doesn’t clearly tell me what I’m supposed to use instead. I’m guessing gpg --recv-keys with some arguments, but which?

The pubkey in question seems to be here: https://raw.githubusercontent.com/clockworkpi/apt/main/debian/KEY.gpg

wget -O - https://raw.githubusercontent.com/clockworkpi/apt/main/debian/KEY.gpg | sudo apt-key add - 
sudo apt-key del  57B7A98BBEBA8C10CA4458810DD08811478B1249
sudo apt update

Everyone needs to update the keys.

5 Likes

Thanks! That worked! :slight_smile:

For those who can’t solve the problem with packmule43’s solution:
1 Use this rom
2 copy /etc/apt/sources.list to your pc
3 copy apt-key to your pc
4 Use the official v0.5 rom
5 replace the /etc/apt/sources.list with the file in your pc
6 import apt-key
7 sudo apt update

and for chinese:

deb http://mirrors.cloud.tencent.com/debian/ buster main non-free contrib
deb http://mirrors.cloud.tencent.com/debian-security buster/updates main
deb http://mirrors.cloud.tencent.com/debian/ buster-updates main non-free contrib
deb http://mirrors.cloud.tencent.com/debian/ buster-backports main non-free contrib

deb-src http://mirrors.cloud.tencent.com/debian-security buster/updates main
deb-src http://mirrors.cloud.tencent.com/debian/ buster main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian/ buster-backports main non-free contrib