I got this error while trying to install ros2 humble:

Err:6 http://packages.ros.org/ros2/ubuntu mantic Release
  404  Not Found [IP: 140.211.166.134 80]
Reading package lists... Done                 
E: The repository 'http://packages.ros.org/ros2/ubuntu mantic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.