Husarion repository expired key

When updating packages on the robot I get an error relating to husarion repository:

husarion@cseerosbot4:~$ sudo apt update
Hit:1 http://ppa.launchpad.net/aaeon-cm/5.4-upboard/ubuntu focal InRelease
Hit:2 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:4 https://install.husarnet.com/deb all InRelease
Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:7 http://packages.ros.org/ros/ubuntu focal InRelease
Get:8 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Err:4 https://install.husarnet.com/deb all InRelease
  The following signatures were invalid: EXPKEYSIG 197D62F68A4C7BD6 Husarnet Authors <contact@husarnet.com>
Get:9 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [874 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [284 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [168 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [538 kB]
Get:13 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [8,708 B]
Get:14 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [417 kB]
Get:15 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [59.8 kB]
Get:16 http://security.ubuntu.com/ubuntu focal-security/universe i386 Packages [507 kB]
Get:17 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [639 kB]
Get:18 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [102 kB]
Get:19 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [12.4 kB]
Get:20 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,222 kB]
Get:21 http://us.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [261 kB]
Get:22 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.3 kB]
Get:23 http://us.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [454 kB]
Get:24 http://us.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [65.0 kB]
Get:25 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [855 kB]
Get:26 http://us.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [634 kB]
Get:27 http://us.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [182 kB]
Get:28 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [18.8 kB]
Fetched 7,644 kB in 7s (1,118 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
620 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://install.husarnet.com/deb all InRelease: The following signatures were invalid: EXPKEYSIG 197D62F68A4C7BD6 Husarnet Authors <contact@husarnet.com>
W: Failed to fetch https://install.husarnet.com/deb/dists/all/InRelease  The following signatures were invalid: EXPKEYSIG 197D62F68A4C7BD6 Husarnet Authors <contact@husarnet.com>
W: Some index files failed to download. They have been ignored, or old ones used instead.

How do I fix this please?
Thank you.

1 Like

Hi Jon,

Actually it’s Husarnet not Husarion repo. Instruction how to solve this issue is already on our community. Please check it :slight_smile:

Best regards,
Hubert

Hi Hubert,

Thank you for the link. I tried it but the solution did not work. I get
gpg: No valid OpenPGP data found

Weird.
I’m not sure what to try next.

Thank you and regards,
Jon.

Hi Jon,

Please try with:

curl https://install.husarnet.com/repo.key | sudo apt-key add -

Please let me know about results.

Best,
Dominik

Hi Dominik,

Yes thank you that command worked successfully!
I did not need to run it as root user.

Best regards,
Jon.

Found this after failing to perform steps at Husarnet Client app manual for Linux | Husarnet - the doc there still states the old key file name. Can I suggest an update over there?

However, even after adding that key:

...
Err:4 https://install.husarnet.com/deb all Release                                                                                           
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 51.178.64.85 443]
...
Reading package lists... Done      
E: The repository 'https://install.husarnet.com/deb all Release' no longer has 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.

Hi It’s not related with Husarnet key expire but with certificate authority: DST Root CA X3 Expiration (September 2021) - Let's Encrypt .

It could be solved in most use cases by only executing

sudo apt update

If it doesn’t work, please execute that, before installing Husarnet:

sudo apt-get install -y ca-certificates