apt get update fails after VM snapshot reset

After you reset your VM to a snapshot including RAM you might have to time from the VM snapshot still active. So your apt get using https might fail due to the wrong time: "*update source* is not valid yet (invalid for another 46min 26s)".

Example:

[11:14:04] root@linubu22nf435:~#
[11:14:07] root@linubu22nf435:~# date
Tue 31 Oct 2023 11:14:08 PM CET
[11:14:08] root@linubu22nf435:~#
[11:14:08] root@linubu22nf435:~# apt update && apt install -y software-properties-common
Hit:1 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-security InRelease
Ign:5 https://download.webmin.com/download/repository sarge InRelease
Get:6 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:7 https://download.webmin.com/download/repository sarge Release
Reading package lists... Done
E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease is not valid yet (invalid for another 46min 26s). Updates for this repository will not be applied.
[11:14:20] root@linubu22nf435:~#
[11:14:23] root@linubu22nf435:~# sudo hwclock --hctosys
[11:15:06] root@linubu22nf435:~#
[12:37:53] root@linubu22nf435:~# date
Tue 31 Oct 2023 12:38:27 PM CET
[12:38:27] root@linubu22nf435:~#
[12:38:28] root@linubu22nf435:~#
 

Using sudo hwclock --hctosys you update your time and apt get and apt install with https should work fine again.

2 comments:

  1. Buy the Best Quality Patches Wholesale Leather Patch Hats
    Businesses seeking to buy the best quality patches often choose custom leather patch hats wholesale for branding and resale. Options like custom leather patch hats wholesale no minimum are ideal for startups, while large companies benefit from bulk discounts in the USA market. A common question is, Does Rush Patch sell custom hats? Yes, they specialize in them. Another is, What oz of leather for hat patches ensures quality? Typically, 5–6 oz leather offers durability without stiffness. Whether you’re after men custom leather patch hats wholesale or trucker custom leather patch hats wholesale, these patches deliver professional style and reliability. https://rushpatch.com/blogs/news/buy-the-best-quality-patches-pro-guide-tricks-and-stores

    ReplyDelete
  2. Minecraft Name Labels Stickers Free, Custom & Printable Designs
    Keep your items organized with Minecraft name labels stickers made for schools, kids, and office supplies. Our collection includes custom Minecraft name label themed stickers, printable templates, and free downloads. Try our Minecraft name labels maker for a personalized touch or grab a Minecraft name labels template free for quick DIY labeling. With options like Minecraft name labels stickers printable and Minecraft name stickers, labeling becomes simple and fun. Whether you want Minecraft name labels free or premium designs, our solutions are perfect for fans who want creativity and practicality in one.
    https://rushpatch.com/blogs/news/minecraft-name-labels-stickers-creative-personalization-for-kids

    ReplyDelete

Add a CA certificate to GitLab running in a podman container

Adding a CA certificate to GitLab which is running in a podman container (also works with docker containers, just replace podman with docker...