Public Key Error

25 views
Skip to first unread message

Ross Lunan

unread,
Nov 25, 2025, 4:12:39 PM (7 days ago) Nov 25
to HomeBrew Robotics Club
Doing a $ sudo apt update today on my Ubuntu 24.04 jazzy machine got this error message ....
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.ros2.org/ubuntu/main noble InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
W: Failed to fetch http://repo.ros2.org/ubuntu/main/dists/noble/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
W: Some index files failed to download. They have been ignored, or old ones used instead.

OMG...

Searching suggested deleting the /etc/apt/sources.list.d/ros2.list and redoing the ros2 debian install: https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html
Doing this produced the same error . Appreciate any ideas to fix. Ross

Sergei Grichine

unread,
Nov 25, 2025, 4:40:12 PM (7 days ago) Nov 25
to hbrob...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/hbrobotics/315cefa5-2efd-48ae-bd3e-593cfe9f8437n%40googlegroups.com.

Ross Lunan

unread,
Nov 25, 2025, 5:28:41 PM (7 days ago) Nov 25
to HomeBrew Robotics Club
Good & tnx as that fixed the NO_PUBKEY error but now have a new log msg
http://repo.ros2.org/ubuntu/main/dists/noble/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Regards
Ross

Marco Walther

unread,
Nov 26, 2025, 12:05:52 AM (7 days ago) Nov 26
to hbrob...@googlegroups.com
On 11/25/25 14:28, 'Ross Lunan' via HomeBrew Robotics Club wrote:
> Good & tnx as that fixed the NO_PUBKEY error but now have a new log msg
> http://repo.ros2.org/ubuntu/main/dists/noble/InRelease: Key is stored in
> legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION
> section in apt-key(8) for details.
> Regards
> Ross

Ross, did you really follow all the steps from your link? ROS[2] did
change how they distribute the apt sources file and the public key!

The important steps are

------------------------------------------------
$ export ROS_APT_SOURCE_VERSION=$(curl -s
https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest
| grep -F "tag_name" | awk -F\" '{print $4}')

$ curl -L -o /tmp/ros2-apt-source.deb
"https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(.
/etc/os-release && echo ${UBUNTU_CODENAME:-${VERSION_CODENAME}})_all.deb"

$ sudo dpkg -i /tmp/ros2-apt-source.deb
-------------------------------------------------

After that, you should have the ros2-apt-source package installed

-------------------------------------------------
root@feather7:~# dpkg -l ros2-apt-source
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============-============-============-==========================================================
ii ros2-apt-source 1.1.0~noble all Source and key
configuration for the ROS 2 apt repository.
root@feather7:~# dpkg -L ros2-apt-source
/.
/etc
/etc/apt
/etc/apt/sources.list.d
/usr
/usr/share
/usr/share/doc
/usr/share/doc/ros2-apt-source
/usr/share/doc/ros2-apt-source/changelog.gz
/usr/share/doc/ros2-apt-source/copyright
/usr/share/keyrings
/usr/share/keyrings/ros2-archive-keyring.gpg
/usr/share/ros-apt-source
/usr/share/ros-apt-source/ros2.sources
/etc/apt/sources.list.d/ros2.sources
root@feather7:~# cat /etc/apt/sources.list.d/ros2.sources
Types: deb deb-src
URIs: http://packages.ros.org/ros2/ubuntu
Suites: noble
Components: main
Signed-By: -----BEGIN PGP PUBLIC KEY BLOCK-----
.
mQINBFzvJpYBEADY8l1YvO7iYW5gUESyzsTGnMvVUmlV3XarBaJz9bGRmgPXh7jc
VFrQhE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J2I/n6X4U8r6sMdDE7QDw4j
FMdrxC0XmCL4cFPkkR1qadtJy9FiCtpKyqiKuUsCG6AUi5EOY+7Y3oSpKn8Wp1K5
VMbv12JRIatDIeaAnwa2qyBQVAVC1F/OqWUFKluPjKyMR3DXKwjxpt1P+HUmda0w
HcnhFIu2th/egmGKH5e3atcVxjAxYfm+f92MN7fFEuFQsMZhI/gt3IgESWrgdaAz
opRInrMz7yEtz3VaaehwmUUR2gevPQMzBRaA+NIqMLDUvV5jujvFe8c1VUtBLTYc
/alBiM/Mo1niy3aUfDahzhTr6zz+ur6BFRnNFWv56M3NOVlreNm3NIbNX2kTKh0Z
QJSSCklJuDUqnPmAzT2BZWUpwfe7QYRwvQhF0YB2N1LavyNwiyfinCQlAh+Q9eme
2jqGsxvQym3sAPnWvA68
=xH9H
-----END PGP PUBLIC KEY BLOCK-----

---------------------------------------------------

And things work fine for me;-) Make sure, there is no other/old ROS
related file in /etc/apt/sources.list.d/ ;-)

-- Marco


>
> On Tuesday, November 25, 2025 at 4:40:12 p.m. UTC-5 Sergei Grichine wrote:
>
> Solution (look for last recipe): https://askubuntu.com/
> questions/1341378/invalid-signature-error-for-ros-repository-while-
> trying-to-do-sudo-apt-get-updat <https://askubuntu.com/
> questions/1341378/invalid-signature-error-for-ros-repository-while-
> trying-to-do-sudo-apt-get-updat>
>
> sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/
> master/ros.key <https://raw.githubusercontent.com/ros/rosdistro/
> master/ros.key> -o /usr/share/keyrings/ros-archive-keyring.gpg
>
> Best Regards,
> -- Sergei
>
>
> On Tue, Nov 25, 2025 at 3:12 PM 'Ross Lunan' via HomeBrew Robotics
> Club <hbrob...@googlegroups.com> wrote:
>
> Doing a $ sudo apt update today on my Ubuntu 24.04 jazzy machine
> got this error message ....
> All packages are up to date.
> W: An error occurred during the signature verification. The
> repository is not updated and the previous index files will be
> used. GPG error: http://repo.ros2.org/ubuntu/main <http://
> repo.ros2.org/ubuntu/main> noble InRelease: The following
> signatures couldn't be verified because the public key is not
> available: NO_PUBKEY F42ED6FBAB17C654
> W: Failed to fetch http://repo.ros2.org/ubuntu/main/dists/noble/
> InRelease <http://repo.ros2.org/ubuntu/main/dists/noble/
> InRelease>  The following signatures couldn't be verified
> because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
> W: Some index files failed to download. They have been ignored,
> or old ones used instead.
>
> OMG...
>
> Searching suggested deleting the /etc/apt/sources.list.d/
> ros2.list and redoing the ros2 debian install: https://
> docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html
> <https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-
> Debs.html>
> Doing this produced the same error . Appreciate any ideas to
> fix. Ross
>
> --
> You received this message because you are subscribed to the
> Google Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to hbrobotics+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/
> hbrobotics/315cefa5-2efd-48ae-
> bd3e-593cfe9f8437n%40googlegroups.com <https://
> groups.google.com/d/msgid/hbrobotics/315cefa5-2efd-48ae-
> bd3e-593cfe9f8437n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> hbrobotics/e8d5c267-ff5e-40c4-89b6-5c960486de06n%40googlegroups.com
> <https://groups.google.com/d/msgid/hbrobotics/e8d5c267-
> ff5e-40c4-89b6-5c960486de06n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

Ross Lunan

unread,
Nov 26, 2025, 3:26:21 PM (6 days ago) Nov 26
to HomeBrew Robotics Club
** Fixed ** by:
- In /etc/apt/sources.d/ removed "ros2-latest.list" and 
- in /etc/apt removed "trusted.gpg". 
- Ran the 3 prescribed ROS 2 Debian Install scripts , sudo apt update. The "trusted.gpg" file reappeared but no "trusted.gpg keyring (/etc/apt/trusted.gpg") error notification this time. Not sure that this script rerun was actually necessary.
TaDa . 
A query to Google AI told me that this notification is just a warning.
I have no idea where that spurious "ros2-latest.list file came from, which is not in the UB24/Jazzy install on my Raspberry Pi. And running "update" && "upgrade" on the RasPi5/Jazzy do not generate the warning.
Regards & much appreciation Ross 

Marco Walther

unread,
Nov 26, 2025, 5:09:50 PM (6 days ago) Nov 26
to hbrob...@googlegroups.com
On 11/26/25 12:26, 'Ross Lunan' via HomeBrew Robotics Club wrote:
> ** Fixed ** by:
> - In /etc/apt/sources.d/ removed "ros2-latest.list" and
> - in /etc/apt removed "trusted.gpg".
> - Ran the 3 prescribed ROS 2 Debian Install scripts , sudo apt update.
> The "trusted.gpg" file reappeared but no "trusted.gpg keyring (/etc/apt/
> trusted.gpg") error notification this time. Not sure that this script
> rerun was actually necessary.
> TaDa .
> A query to Google AI told me that this notification is just a warning.
> I have no idea where that spurious "ros2-latest.list file came from,

Did you play with ROS2/Humble *on that computer* for some time? The ROS
people changed how they get you the ros*.list file and the public key.
If you installed ROS2 initially with the old setup on there, that file
is left over. I ran into that problem on my laptop:-( Much harder to
'start from scratch' on that box;-)

-- Marco

> which is not in the UB24/Jazzy install on my Raspberry Pi. And running
> "update" && "upgrade" on the RasPi5/Jazzy do not generate the warning.
> Regards & much appreciation Ross
> On Wednesday, November 26, 2025 at 12:05:52 a.m. UTC-5 Marco Walther wrote:
>
> On 11/25/25 14:28, 'Ross Lunan' via HomeBrew Robotics Club wrote:
> > Good & tnx as that fixed the NO_PUBKEY error but now have a new
> log msg
> > http://repo.ros2.org/ubuntu/main/dists/noble/InRelease <http://
> repo.ros2.org/ubuntu/main/dists/noble/InRelease>: Key is stored in
> > legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the
> DEPRECATION
> > section in apt-key(8) for details.
> > Regards
> > Ross
>
> Ross, did you really follow all the steps from your link? ROS[2] did
> change how they distribute the apt sources file and the public key!
>
> The important steps are
>
> ------------------------------------------------
> $ export ROS_APT_SOURCE_VERSION=$(curl -s
> https://api.github.com/repos/ros-infrastructure/ros-apt-source/
> releases/latest <https://api.github.com/repos/ros-infrastructure/
> ros-apt-source/releases/latest>
> | grep -F "tag_name" | awk -F\" '{print $4}')
>
> $ curl -L -o /tmp/ros2-apt-source.deb
> "https://github.com/ros-infrastructure/ros-apt-source/releases/
> download/${ROS_APT_SOURCE_VERSION}/ros2-apt-
> source_${ROS_APT_SOURCE_VERSION}.$( <https://github.com/ros-
> infrastructure/ros-apt-source/releases/download/$
> %7BROS_APT_SOURCE_VERSION%7D/ros2-apt-source_$
> %7BROS_APT_SOURCE_VERSION%7D.$(>.
> URIs: http://packages.ros.org/ros2/ubuntu <http://packages.ros.org/
> ros2/ubuntu>
> > Solution (look for last recipe): https://askubuntu.com/ <https://
> askubuntu.com/>
> > questions/1341378/invalid-signature-error-for-ros-repository-while-
> > trying-to-do-sudo-apt-get-updat <https://askubuntu.com/ <https://
> askubuntu.com/>
> > questions/1341378/invalid-signature-error-for-ros-repository-while-
> > trying-to-do-sudo-apt-get-updat>
> >
> > sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/
> <https://raw.githubusercontent.com/ros/rosdistro/>
> > master/ros.key <https://raw.githubusercontent.com/ros/rosdistro/
> <https://raw.githubusercontent.com/ros/rosdistro/>
> > master/ros.key> -o /usr/share/keyrings/ros-archive-keyring.gpg
> >
> > Best Regards,
> > -- Sergei
> >
> >
> > On Tue, Nov 25, 2025 at 3:12 PM 'Ross Lunan' via HomeBrew Robotics
> > Club <hbrob...@googlegroups.com> wrote:
> >
> > Doing a $ sudo apt update today on my Ubuntu 24.04 jazzy machine
> > got this error message ....
> > All packages are up to date.
> > W: An error occurred during the signature verification. The
> > repository is not updated and the previous index files will be
> > used. GPG error: http://repo.ros2.org/ubuntu/main <http://
> repo.ros2.org/ubuntu/main> <http://
> > repo.ros2.org/ubuntu/main <http://repo.ros2.org/ubuntu/main>>
> noble InRelease: The following
> > signatures couldn't be verified because the public key is not
> > available: NO_PUBKEY F42ED6FBAB17C654
> > W: Failed to fetch http://repo.ros2.org/ubuntu/main/dists/noble/
> <http://repo.ros2.org/ubuntu/main/dists/noble/>
> > InRelease <http://repo.ros2.org/ubuntu/main/dists/noble/ <http://
> repo.ros2.org/ubuntu/main/dists/noble/>
> > InRelease>  The following signatures couldn't be verified
> > because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
> > W: Some index files failed to download. They have been ignored,
> > or old ones used instead.
> >
> > OMG...
> >
> > Searching suggested deleting the /etc/apt/sources.list.d/
> > ros2.list and redoing the ros2 debian install: https://
> > docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html
> <http://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html>
> > <https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-
> <https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install->
> > Debs.html>
> > Doing this produced the same error . Appreciate any ideas to
> > fix. Ross
> >
> > --
> > You received this message because you are subscribed to the
> > Google Groups "HomeBrew Robotics Club" group.
> > To unsubscribe from this group and stop receiving emails from
> > it, send an email to hbrobotics+...@googlegroups.com.
> > To view this discussion visit https://groups.google.com/d/msgid/
> <https://groups.google.com/d/msgid/>
> > hbrobotics/315cefa5-2efd-48ae-
> > bd3e-593cfe9f8437n%40googlegroups.com <http://40googlegroups.com>
> <https://
> > groups.google.com/d/msgid/hbrobotics/315cefa5-2efd-48ae- <http://
> groups.google.com/d/msgid/hbrobotics/315cefa5-2efd-48ae->
> > bd3e-593cfe9f8437n%40googlegroups.com <http://40googlegroups.com>?
> > utm_medium=email&utm_source=footer>.
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "HomeBrew Robotics Club" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to hbrobotics+...@googlegroups.com
> > <mailto:hbrobotics+...@googlegroups.com>.
> > To view this discussion visit https://groups.google.com/d/msgid/
> <https://groups.google.com/d/msgid/>
> > hbrobotics/e8d5c267-
> ff5e-40c4-89b6-5c960486de06n%40googlegroups.com
> <http://40googlegroups.com>
> > <https://groups.google.com/d/msgid/hbrobotics/e8d5c267- <https://
> groups.google.com/d/msgid/hbrobotics/e8d5c267->
> > ff5e-40c4-89b6-5c960486de06n%40googlegroups.com
> <http://40googlegroups.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> hbrobotics/ad992504-c7f8-4cfa-8637-822471b09b7an%40googlegroups.com
> <https://groups.google.com/d/msgid/hbrobotics/ad992504-
> c7f8-4cfa-8637-822471b09b7an%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages