irontec / sngrep

Ncurses SIP Messages flow viewer
GNU General Public License v3.0
1.01k stars 189 forks source link

GPG Key Error on Debian 12 (Bookworm) #475

Closed kismetgerald closed 5 months ago

kismetgerald commented 8 months ago

Good-day,

I know this isn't directly related to SNGREP's functionality, however, thought I'd report it anyway to bring it to your attention. On a fresh install of Debian 12 (Bookworm), I am running into the following error when running "apt update":

Get:5 http://packages.irontec.com/debian bookworm InRelease [6,437 B]
Err:5 http://packages.irontec.com/debian bookworm InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 90D20F5ED8C20040
Reading package lists... Done
W: GPG error: http://packages.irontec.com/debian bookworm InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 90D20F5ED8C20040
E: The repository 'http://packages.irontec.com/debian bookworm InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

I then visited your Wiki to see if you had any updated guidance on how to deal with this. Not seeing any, I tried adding the key using the command wget http://packages.irontec.com/public.key -q -O - | apt-key add -, which resulted in the following message:

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

Any help on this is very much appreciated, thank you.

Kaian commented 8 months ago

Hi!

After adding the key, you'll receive a warning that should not prevent installing packages, but we could replace the command for these one in the wiki to avoid that warning:

 wget http://packages.irontec.com/public.key -q -O /etc/apt/trusted.gpg.d/irontec-debian-repository.asc

Best regards,

kevinrz6 commented 8 months ago

Kaian, Just wanted to chime in and let you know that this is also the case with Debian 11 and ubuntu 22.04.

Thank you and we appreciate all the hard work.

Kaian commented 5 months ago

Updated wiki instructions to download Server GPG public key.

This method should give no warnings.

Best regards!

kismetgerald commented 4 months ago

@Kaian Sorry to re-open this issue. However, looks like the NO_PUBKEY issue is still present on Debian 12 (Bookworm).

Today I ran a "apt update" and saw this error in the output:

E: The repository 'http://packages.irontec.com/debian bookworm InRelease' is not signed.

Kaian commented 4 months ago

This is quite strange, configuring the repo in a clean docker image gives me no error:

➜  ~ docker run -it debian:bookworm bash
root@b79517f2de9f:/# apt update; apt install wget
[....]
root@b79517f2de9f:/# echo deb http://packages.irontec.com/debian bookworm main > /etc/apt/sources.list.d/irontec.list
root@b79517f2de9f:/# wget http://packages.irontec.com/public.key -q -O /etc/apt/trusted.gpg.d/irontec-debian-repository.asc
root@b79517f2de9f:/# apt update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
Get:4 http://packages.irontec.com/debian bookworm InRelease [6437 B]
Get:5 http://packages.irontec.com/debian bookworm/main amd64 Packages [828 B]
Fetched 7265 B in 0s (14.8 kB/s) 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@b79517f2de9f:/# 

That error looks like you've skipped downloading the key (the wget command)

kismetgerald commented 4 months ago

Interesting indeed.

So I deleted my local repo and keyfile, and recreated it exactly as you'd done and now the error is gone. Thanks for patiently entertaining me.