# Expired ROS GPG key & new RealSense APT repo

**URL:** <https://forum.hello-robot.com/t/expired-ros-gpg-key-new-realsense-apt-repo/205>\
**Category:** Announce\
**Created:** [June 11, 2021, 2:53pm UTC](https://forum.hello-robot.com/t/expired-ros-gpg-key-new-realsense-apt-repo/205 "2021-06-11T14:53:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bshah](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/bshah/32/55_2.png) [@bshah](https://forum.hello-robot.com/u/bshah)\
**Post date:** [June 11, 2021, 2:53pm UTC](https://forum.hello-robot.com/t/expired-ros-gpg-key-new-realsense-apt-repo/205/1 "2021-06-11T14:53:38Z")

</div>

Hi all,

Recently, there have been two upstream changes to APT repositories that may affect how Stretch users update software on their robots:

1. The ROS GPG key has expired. This key was used to ensure the security of ROS 1 and ROS 2 updates from their APT repositories. See the [ROS Discourse post](https://discourse.ros.org/t/ros-gpg-key-expiration-incident/20669) for more details.
2. The RealSense APT repo URL was changed to use the secure version of the hypertext transfer protocol (HTTPS). See the [RealSense issue tracker](https://github.com/IntelRealSense/librealsense/issues/9102) for more details.

## What this means for Stretch Users

Our installation process has been [updated](https://github.com/hello-robot/stretch_install/pull/15), so new robots will not need to apply the fixes below. For everyone else, the next time you run `sudo apt update`, you may see one or both of the following errors.

### Outdated RealSense Repo

If you see the following error

```bash
Err:XX http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic InRelease                                   
  403 Forbidden [IP: 52.218.36.57 80]
[...]
E: Failed to fetch http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo/dists/bionic/InRelease 403 Forbidden [IP: 52.218.36.57 80]
E: The repository 'http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic InRelease' is no longer signed.

```

Remove the offending APT repo and add the new secure repo with:

```bash
$ sudo add-apt-repository --remove "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main" -u
$ sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo bionic main" -u

```

### Expired ROS GPG Key

If you see the following error

```bash
Err:XX http://packages.ros.org/ros/ubuntu bionic InRelease                             
  The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics <info@osrfoundation.org>
[...]
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://packages.ros.org/ros/ubuntu bionic InRelease: The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics <info@osrfoundation.org>
W: Failed to fetch http://packages.ros.org/ros/ubuntu/dists/bionic/InRelease The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics <info@osrfoundation.org>

```

Update the key for the ROS 1 APT repository with:

```bash
$ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

```

For ROS2 users, see the [ROS Discourse post](https://discourse.ros.org/t/ros-gpg-key-expiration-incident/20669) for the command used to update the key for the ROS 2 APT repository.

---

<div class="post-metadata">

**Author:** ![bshah](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/bshah/32/55_2.png) [@bshah](https://forum.hello-robot.com/u/bshah)\
**Post date:** [June 11, 2021, 2:57pm UTC](https://forum.hello-robot.com/t/expired-ros-gpg-key-new-realsense-apt-repo/205/2 "2021-06-11T14:57:13Z")

</div>


