Dietpi-update failed while not trusted certificates; please help

Details:

  • Date | Mon May 30 07:24:11 CEST 2022
  • DietPi version | v8.5.0 (MichaIng/beta)
  • Image creator | DietPi Core Team
  • Pre-image | Raspberry Pi OS Lite 64-bit
  • Hardware | RPi 4 Model B (aarch64) (ID=4)
  • Kernel version | Linux RasPi4 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux
  • Distro | bullseye (ID=6,RASPBIAN=0)
  • Command | apt-get -y update
  • Exit code | 100
  • Software title | DietPi-Update

Steps to reproduce:

Expected behaviour:

Actual behaviour:

Extra details:

Additional logs:

Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:3 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:4 http://deb.debian.org/debian bullseye-backports InRelease [49.0 kB]
Err:5 https://archive.raspberrypi.org/debian bullseye InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate.  Could not handshake: Error in the certificate verification. [IP: 2a00:1098:88:26::1:1 443]
Err:6 https://download.webmin.com/download/repository sarge InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 104.207.151.13 443]
Reading package lists...
E: Release file for http://deb.debian.org/debian/dists/bullseye/InRelease is not valid yet (invalid for another 40d 4h 19min 3s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/bullseye-updates/InRelease is not valid yet (invalid for another 62d 15h 6min 10s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian-security/dists/bullseye-security/InRelease is not valid yet (invalid for another 62d 6h 47min 49s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/bullseye-backports/InRelease is not valid yet (invalid for another 62d 15h 6min 10s). Updates for this repository will not be applied.

A lot of times this error is caused by the system time being incorrect.

Is this the time your box is reporting? It’s two months off! If you correct the system time that should resolve the issue.

pls try following

/boot/dietpi/func/run_ntpd 1
apt update
apt upgrade

root@RasPi4:~# /boot/dietpi/func/run_ntpd 1
[ INFO ] DietPi-TimeSync | Manual mode detected, skipping time sync
root@RasPi4:~#

looks like you disabled the time synchronization. Any reason for this? Did you use some individual time sync application? If not, you should enable time sync again.

I try dietpi-config time sync mode from custom mode to Boot + Daily, unsuccessful:

APT update                                                                                                           │
                                           │  - Command: apt-get -y update                                                                                        │
                                           │  - Exit code: 100                                                                                                    │
                                           │  - DietPi version: v8.5.0 (MichaIng/beta) | HW_MODEL: 4 | HW_ARCH: 3 | DISTRO: 6                                     │
                                           │  - Image creator: DietPi Core Team                                                                                   │
                                           │  - Pre-image: Raspberry Pi OS Lite 64-bit                                                                            │
                                           │  - Error log:                                                                                                        │
                                           │ Err:1 https://archive.raspberrypi.org/debian bullseye InRelease                                                      │
                                           │   Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid          │
                                           │ certificate.  Could not handshake: Error in the certificate verification. [IP: 2a00:1098:80:56::2:1 443]             │
                                           │ Get:2 http://deb.debian.org/debian bullseye InRelease [116 kB]                                                       │
                                           │ Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]                                              │
                                           │ Get:4 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]                                    │
                                           │ Get:5 http://deb.debian.org/debian bullseye-backports InRelease [49.0 kB]                                            │
                                           │ Err:6 https://download.webmin.com/download/repository sarge InRelease                                                │
                                           │   Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.   │
                                           │ Could not handshake: Error in the certificate verification. [IP: 45.76.69.64 443]                                    │
                                           │ Reading package lists...                                                                                             │
                                           │ E: Release file for http://deb.debian.org/debian/dists/bullseye/InRelease is not valid yet (invalid for another 39d  │
                                           │ 16h 45min 0s). Updates for this repository will not be applied.                                                      │
                                           │ E: Release file for http://deb.debian.org/debian/dists/bullseye-updates/InRelease is not valid yet (invalid for      │
                                           │ another 62d 9h 27min 15s). Updates for this repository will not be applied.                                          │
                                           │ E: Release file for http://deb.debian.org/debian-security/dists/bullseye-security/InRelease is not valid yet         │
                                           │ (invalid for another 61d 19h 13min 46s). Updates for this repository will not be applied.                            │
                                           │ E: Release file for http://deb.debian.org/debian/dists/bullseye-backports/InRelease is not valid yet (invalid for    │
                                           │ another 62d 9h 27min 16s). Updates for this repository will not be applied. 

Did you tried that one afterwards? Your system time did not seems to be in sync still.

1 Like

Es funktioniert nicht.

root@RasPi4:~#  /boot/dietpi/func/run_ntpd 1
[ INFO ] DietPi-TimeSync | Manual mode detected, skipping time sync
root@RasPi4:~# apt update
Holen:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Holen:2 http://deb.debian.org/debian bullseye-updates InRelease [44,1 kB]
Fehl:3 https://archive.raspberrypi.org/debian bullseye InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate.  Could not handshake: Error in the certificate verification. [IP: 2a00:1098:82:47::1 443]
Holen:4 http://deb.debian.org/debian-security bullseye-security InRelease [48,4 kB]
Holen:5 http://deb.debian.org/debian bullseye-backports InRelease [49,0 kB]
Fehl:6 https://download.webmin.com/download/repository sarge InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 45.76.69.64 443]
Paketlisten werden gelesen… Fertig
E: Release-Datei für http://deb.debian.org/debian/dists/bullseye/InRelease ist noch nicht gültig (ungültig für weitere 39 d 8 h 27 min 25 s). Aktualisierungen für dieses Depot werden nicht angewendet.
E: Release-Datei für http://deb.debian.org/debian/dists/bullseye-updates/InRelease ist noch nicht gültig (ungültig für weitere 62 d 12 h 56 min 29 s). Aktualisierungen für dieses Depot werden nicht angewendet.
E: Release-Datei für http://deb.debian.org/debian-security/dists/bullseye-security/InRelease ist noch nicht gültig (ungültig für weitere 62 d 14 h 56 min 8 s). Aktualisierungen für dieses Depot werden nicht angewendet.
E: Release-Datei für http://deb.debian.org/debian/dists/bullseye-backports/InRelease ist noch nicht gültig (ungültig für weitere 62 d 12 h 56 min 29 s). Aktualisierungen für dieses Depot werden nicht angewendet.
root@RasPi4:~# apt upgrade
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Paketaktualisierung (Upgrade) wird berechnet… Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
root@RasPi4:~#

Wenn ich time sync mittels dietpi-config → Time sync mode von 0 Custom auf 2 Boot + Daily (Recommended) umstelle, kommt ein Fehler:

 APT update                                                                                                           │
                                           │  - Command: apt-get -y update                                                                                        │
                                           │  - Exit code: 100                                                                                                    │
                                           │  - DietPi version: v8.5.0 (MichaIng/beta) | HW_MODEL: 4 | HW_ARCH: 3 | DISTRO: 6                                     │
                                           │  - Image creator: DietPi Core Team                                                                                   │
                                           │  - Pre-image: Raspberry Pi OS Lite 64-bit                                                                            │
                                           │  - Error log:                                                                                                        │
                                           │ Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]                                                       │
                                           │ Get:2 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]                                              │
                                           │ Get:3 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]                                    │
                                           │ Get:4 http://deb.debian.org/debian bullseye-backports InRelease [49.0 kB]                                            │
                                           │ Err:5 https://archive.raspberrypi.org/debian bullseye InRelease                                                      │
                                           │   Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid          │
                                           │ certificate.  Could not handshake: Error in the certificate verification. [IP: 2a00:1098:82:47::1 443]               │
                                           │ Err:6 https://download.webmin.com/download/repository sarge InRelease                                                │
                                           │   Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.   │
                                           │ Could not handshake: Error in the certificate verification. [IP: 45.76.69.64 443]                                    │
                                           │ Reading package lists...                                                                                             │
                                           │ E: Release file for http://deb.debian.org/debian/dists/bullseye/InRelease is not valid yet (invalid for another 39d  │
                                           │ 8h 22min 36s). Updates for this repository will not be applied.                                                      │
                                           │ E: Release file for http://deb.debian.org/debian/dists/bullseye-updates/InRelease is not valid yet (invalid for      │
                                           │ another 62d 12h 51min 40s). Updates for this repository will not be applied.                                         │
                                           │ E: Release file for http://deb.debian.org/debian-security/dists/bullseye-security/InRelease is not valid yet         │
                                           │ (invalid for another 62d 14h 51min 18s). Updates for this repository will not be applied.                            │
                                           │ E: Release file for http://deb.debian.org/debian/dists/bullseye-backports/InRelease is not valid yet (invalid for    │
                                           │ another 62d 12h 51min 39s). Updates for this repository will not be applied.                                         │
                                           │                                                                                                                      │
                                           │                         Retry          : Re-run the last command that failed                                         │
                                           │                         Open subshell  : Open a subshell to investigate or solve the issue                           │
                                           │                         Send report    : Uploads bugreport containing system info to DietPi                          │
                                           │                                        ●─ Devs only ──────────────────────────────────────●                          │
                                           │                         Change command : Adjust and rerun the command                                 

Wenn es keine Lösung gibt, was nicht weiter schlimm ist, werde ich den Raspi 4 neu aufsetzen.

Danke und viele Grüße.

First, even that we speak German, try to stick to English language as we are an international community and we like to give chance to everyone to follow. Don’t worry if your English is not the best. Nobody is perfect. Feel free to use a translation app.

Your time sync is still set to manually. At the moment it doesn’t make sense to continue running dietpi-update as long as we don’t fixed this behaviour.

You told you are getting an error while switching from manual to daily. What is the exact error messag?. I don’t think it is needed to recreate your system

Is systemd-timesyncd installed?

dpkg -l systemd-timesyncd

It might have been autoremoved when systemd degraded it from a dependency to a recommendation. Try to download and install it manually:

cd /tmp
curl -L 'https://deb.debian.org/debian/pool/main/s/systemd/systemd-timesyncd_247.3-7_arm64.deb' -o package.deb
dpkg -i package.deb
rm package.deb
/boot/dietpi/func/dietpi-set_software ntpd-mode 2
/boot/dietpi/func/run_ntpd 1
apt update
1 Like

It was unsuccessfully:

root@RasPi4:~# dpkg -l systemd-timesyncd
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name              Version      Architektur  Beschreibung
+++-=================-============-============-=================================
un  systemd-timesyncd <keine>      <keine>      (keine Beschreibung vorhanden)
root@RasPi4:~#
root@RasPi4:~# cd /tmp
root@RasPi4:/tmp# curl -L 'https://deb.debian.org/debian/pool/main/s/systemd/systemd-timesyncd_247.3-7_arm64.deb' -o package.deb
-bash: curl: Kommando nicht gefunden.
root@RasPi4:/tmp# dpkg -i package.deb
dpkg: Fehler: Auf das Archiv »package.deb« kann nicht zugegriffen werden: Datei oder Verzeichnis nicht gefunden
root@RasPi4:/tmp# rm package.deb
rm: das Entfernen von 'package.deb' ist nicht möglich: Datei oder Verzeichnis nicht gefunden
root@RasPi4:/tmp# /boot/dietpi/func/dietpi-set_software ntpd-mode 2

 DietPi-Set_software
─────────────────────────────────────────────────────
 Mode: ntpd-mode (2)

[ INFO ] DietPi-Set_software | Checking for required APT packages: systemd-timesyncd
[ INFO ] DietPi-Set_software | APT update, please wait...
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Err:2 https://archive.raspberrypi.org/debian bullseye InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate.  Could not handshake: Error in the certificate verification. [IP: 2a00:1098:80:56::2:1 443]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:5 http://deb.debian.org/debian bullseye-backports InRelease [49.0 kB]
Err:6 https://download.webmin.com/download/repository sarge InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 45.76.69.64 443]
Reading package lists...
E: Release file for http://deb.debian.org/debian/dists/bullseye/InRelease is not valid yet (invalid for another 37d 9h 51min 5s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/bullseye-updates/InRelease is not valid yet (invalid for another 62d 14h 23min 23s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian-security/dists/bullseye-security/InRelease is not valid yet (invalid for another 61d 11h 2min 6s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/bullseye-backports/InRelease is not valid yet (invalid for another 62d 14h 23min 22s). Updates for this repository will not be applied.
[FAILED] DietPi-Set_software | APT update
 - Command: apt-get -y update

---------------------------------------------------------------------
- DietPi has encountered an error                                   -
- Please create a ticket: https://github.com/MichaIng/DietPi/issues -
- Copy and paste only the BLUE lines below into the ticket          -
---------------------------------------------------------------------
#### Details:
- Date           | Thu Jun  2 01:52:09 CEST 2022
- DietPi version | v8.5.0 (MichaIng/beta)
- Image creator  | DietPi Core Team
- Pre-image      | Raspberry Pi OS Lite 64-bit
- Hardware       | RPi 4 Model B (aarch64) (ID=4)
- Kernel version | `Linux RasPi4 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux`
- Distro         | bullseye (ID=6,RASPBIAN=0)
- Command        | `apt-get -y update`
- Exit code      | 100
- Software title | DietPi-Set_software
#### Steps to reproduce:
<!-- Explain how to reproduce the issue -->
1. ...
2. ...
#### Expected behaviour:
<!-- What SHOULD happen? -->
- ...
#### Actual behaviour:
<!-- What IS happening? -->
- ...
#### Extra details:
<!-- Please post any extra details that might help solve the issue -->
- ...
#### Additional logs:
```
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Err:2 https://archive.raspberrypi.org/debian bullseye InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate.  Could not handshake: Error in the certificate verification. [IP: 2a00:1098:80:56::2:1 443]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:5 http://deb.debian.org/debian bullseye-backports InRelease [49.0 kB]
Err:6 https://download.webmin.com/download/repository sarge InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 45.76.69.64 443]
Reading package lists...
E: Release file for http://deb.debian.org/debian/dists/bullseye/InRelease is not valid yet (invalid for another 37d 9h 51min 5s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/bullseye-updates/InRelease is not valid yet (invalid for another 62d 14h 23min 23s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian-security/dists/bullseye-security/InRelease is not valid yet (invalid for another 61d 11h 2min 6s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/bullseye-backports/InRelease is not valid yet (invalid for another 62d 14h 23min 22s). Updates for this repository will not be applied.
```
---------------------------------------------------------------------
[FAILED] DietPi-Set_software | Unable to continue, DietPi-Set_software will now terminate.

root@RasPi4:/tmp# /boot/dietpi/func/run_ntpd 1
[ INFO ] DietPi-TimeSync | Manual mode detected, skipping time sync
root@RasPi4:/tmp# apt update
Holen:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Fehl:2 https://archive.raspberrypi.org/debian bullseye InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate.  Could not handshake: Error in the certificate verification. [IP: 2a00:1098:82:47::1 443]
Holen:3 http://deb.debian.org/debian bullseye-updates InRelease [44,1 kB]
Holen:4 http://deb.debian.org/debian-security bullseye-security InRelease [48,4 kB]
Holen:5 http://deb.debian.org/debian bullseye-backports InRelease [49,0 kB]
Fehl:6 https://download.webmin.com/download/repository sarge InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 104.207.151.13 443]
Paketlisten werden gelesen… Fertig
E: Release-Datei für http://deb.debian.org/debian/dists/bullseye/InRelease ist noch nicht gültig (ungültig für weitere 37 d 9 h 50 min 27 s). Aktualisierungen für dieses Depot werden nicht angewendet.
E: Release-Datei für http://deb.debian.org/debian/dists/bullseye-updates/InRelease ist noch nicht gültig (ungültig für weitere 62 d 14 h 22 min 45 s). Aktualisierungen für dieses Depot werden nicht angewendet.
E: Release-Datei für http://deb.debian.org/debian-security/dists/bullseye-security/InRelease ist noch nicht gültig (ungültig für weitere 61 d 11 h 1 min 27 s). Aktualisierungen für dieses Depot werden nicht angewendet.
E: Release-Datei für http://deb.debian.org/debian/dists/bullseye-backports/InRelease ist noch nicht gültig (ungültig für weitere 62 d 14 h 22 min 44 s). Aktualisierungen für dieses Depot werden nicht angewendet.
root@RasPi4:/tmp#

You are failing on the first step already. Therefore it doesn’t make sense to continue. curl is a core tool on DietPi. Not sure why it is missing on your system.

Could you try your try following

apt install curl

root@RasPi4:~# apt install curl
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Paket curl ist nicht verfügbar, wird aber von einem anderen Paket
referenziert. Das kann heißen, dass das Paket fehlt, dass es abgelöst
wurde oder nur aus einer anderen Quelle verfügbar ist.

E: Für Paket »curl« existiert kein Installationskandidat.
root@RasPi4:~#

Use wget then:

cd /tmp
wget 'https://deb.debian.org/debian/pool/main/s/systemd/systemd-timesyncd_247.3-7_arm64.deb' -O package.deb
dpkg -i package.deb
rm package.deb
/boot/dietpi/func/dietpi-set_software ntpd-mode 2
/boot/dietpi/func/run_ntpd 1
apt update
apt install curl
root@RasPi4:~# cd /tmp
root@RasPi4:/tmp#
wget 'https://deb.debian.org/debian/pool/main/s/systemd/systemd-timesyncd_247.3-7_arm64.deb' -O package.deb
--2022-06-03 03:39:19--  https://deb.debian.org/debian/pool/main/s/systemd/systemd-timesyncd_247.3-7_arm64.deb
Auflösen des Hostnamens deb.debian.org (deb.debian.org)… 2a04:4e42:3::644, 151.101.14.132
Verbindungsaufbau zu deb.debian.org (deb.debian.org)|2a04:4e42:3::644|:443 … verbunden.
FEHLER: Dem Zertifikat von »deb.debian.org« wird nicht vertraut.
FEHLER: Dem Zertifikat von »deb.debian.org« ist noch nicht aktiviert.
Das ausgestellte Zertifikat ist noch nicht aktiviert.
root@RasPi4:/tmp# dpkg -i package.deb
dpkg-deb: Fehler: »package.deb« ist kein Archiv im Debian-Format
dpkg: Fehler beim Bearbeiten des Archivs package.deb (--install):
 »dpkg-deb --control«-Unterprozess gab den Fehlerwert 2 zurück
Fehler traten auf beim Bearbeiten von:
 package.deb
root@RasPi4:/tmp# rm package.deb
root@RasPi4:/tmp# /boot/dietpi/func/dietpi-set_software ntpd-mode 2

 DietPi-Set_software
─────────────────────────────────────────────────────
 Mode: ntpd-mode (2)

[ INFO ] DietPi-Set_software | Checking for required APT packages: systemd-timesyncd
[ INFO ] DietPi-Set_software | APT update, please wait...
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Err:2 https://archive.raspberrypi.org/debian bullseye InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate.  Could not handshake: Error in the certificate verification. [IP: 2a00:1098:82:47::2:1 443]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:5 http://deb.debian.org/debian bullseye-backports InRelease [49.0 kB]
Err:6 https://download.webmin.com/download/repository sarge InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 45.76.69.64 443]
Reading package lists...
E: Release file for http://deb.debian.org/debian/dists/bullseye/InRelease is not valid yet (invalid for another 36d 8h 2min 42s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/bullseye-updates/InRelease is not valid yet (invalid for another 62d 12h 36min 40s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian-security/dists/bullseye-security/InRelease is not valid yet (invalid for another 62d 11h 24min 32s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/bullseye-backports/InRelease is not valid yet (invalid for another 62d 12h 36min 40s). Updates for this repository will not be applied.
[FAILED] DietPi-Set_software | APT update
 - Command: apt-get -y update

---------------------------------------------------------------------
- DietPi has encountered an error                                   -
- Please create a ticket: https://github.com/MichaIng/DietPi/issues -
- Copy and paste only the BLUE lines below into the ticket          -
---------------------------------------------------------------------
#### Details:
- Date           | Fri Jun  3 03:40:34 CEST 2022
- DietPi version | v8.5.0 (MichaIng/beta)
- Image creator  | DietPi Core Team
- Pre-image      | Raspberry Pi OS Lite 64-bit
- Hardware       | RPi 4 Model B (aarch64) (ID=4)
- Kernel version | `Linux RasPi4 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux`
- Distro         | bullseye (ID=6,RASPBIAN=0)
- Command        | `apt-get -y update`
- Exit code      | 100
- Software title | DietPi-Set_software
#### Steps to reproduce:
<!-- Explain how to reproduce the issue -->
1. ...
2. ...
#### Expected behaviour:
<!-- What SHOULD happen? -->
- ...
#### Actual behaviour:
<!-- What IS happening? -->
- ...
#### Extra details:
<!-- Please post any extra details that might help solve the issue -->
- ...
#### Additional logs:

Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Err:2 https://archive.raspberrypi.org/debian bullseye InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate.  Could not handshake: Error in the certificate verification. [IP: 2a00:1098:82:47::2:1 443]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:5 http://deb.debian.org/debian bullseye-backports InRelease [49.0 kB]
Err:6 https://download.webmin.com/download/repository sarge InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 45.76.69.64 443]
Reading package lists...
E: Release file for http://deb.debian.org/debian/dists/bullseye/InRelease is not valid yet (invalid for another 36d 8h 2min 42s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/bullseye-updates/InRelease is not valid yet (invalid for another 62d 12h 36min 40s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian-security/dists/bullseye-security/InRelease is not valid yet (invalid for another 62d 11h 24min 32s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/bullseye-backports/InRelease is not valid yet (invalid for another 62d 12h 36min 40s). Updates for this repository will not be applied.

---------------------------------------------------------------------
[FAILED] DietPi-Set_software | Unable to continue, DietPi-Set_software will now terminate.

root@RasPi4:/tmp# /boot/dietpi/func/run_ntpd 1
[ INFO ] DietPi-TimeSync | Manual mode detected, skipping time sync
root@RasPi4:/tmp# apt update
Holen:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Holen:2 http://deb.debian.org/debian bullseye-updates InRelease [44,1 kB]
Holen:3 http://deb.debian.org/debian-security bullseye-security InRelease [48,4 kB]
Fehl:4 https://archive.raspberrypi.org/debian bullseye InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate.  Could not handshake: Error in the certificate verification. [IP: 2a00:1098:82:47::1:1 443]
Holen:5 http://deb.debian.org/debian bullseye-backports InRelease [49,0 kB]
Fehl:6 https://download.webmin.com/download/repository sarge InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 45.76.69.64 443]
Paketlisten werden gelesen… Fertig
E: Release-Datei für http://deb.debian.org/debian/dists/bullseye/InRelease ist noch nicht gültig (ungültig für weitere 36 d 8 h 2 min 3 s). Aktualisierungen für dieses Depot werden nicht angewendet.
E: Release-Datei für http://deb.debian.org/debian/dists/bullseye-updates/InRelease ist noch nicht gültig (ungültig für weitere 62 d 12 h 36 min 1 s). Aktualisierungen für dieses Depot werden nicht angewendet.
E: Release-Datei für http://deb.debian.org/debian-security/dists/bullseye-security/InRelease ist noch nicht gültig (ungültig für weitere 62 d 11 h 23 min 53 s). Aktualisierungen für dieses Depot werden nicht angewendet.
E: Release-Datei für http://deb.debian.org/debian/dists/bullseye-backports/InRelease ist noch nicht gültig (ungültig für weitere 62 d 12 h 36 min 1 s). Aktualisierungen für dieses Depot werden nicht angewendet.
root@RasPi4:/tmp# apt install curl
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Paket curl ist nicht verfügbar, wird aber von einem anderen Paket
referenziert. Das kann heißen, dass das Paket fehlt, dass es abgelöst
wurde oder nur aus einer anderen Quelle verfügbar ist.

E: Für Paket »curl« existiert kein Installationskandidat.
root@RasPi4:/tmp#

Es ist ein Testsystem und es ist nicht in produktiver Nutzung. Neu aufsetzen wäre eine gangbare Option.

again you are failing on the first step. Therefore it doesn’t make sense to continue.

Let’s try on http instead of https. This should bypass the certificate issue

cd /tmp
wget 'http://deb.debian.org/debian/pool/main/s/systemd/systemd-timesyncd_247.3-7_arm64.deb' -O package.deb
dpkg -i package.deb
rm package.deb
2 Likes

That´s it!
My DietPi on RasPi4 running after updates with zero errors.
Now I reboot the machine . . . it wants to update from v8.5.0 to v8.7.1 . . . successful!

root@RasPi4:~# dietpi-update

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Checking for available DietPi update

[  OK  ] DietPi-Update | Checking network connectivity
[  OK  ] DietPi-Update | Checking DNS resolver
[ INFO ] DietPi-TimeSync | Manual mode detected, skipping time sync
[ INFO ] DietPi-Update | Getting latest version from: https://raw.githubusercontent.com/MichaIng/DietPi/beta/.update/version
[  OK  ] DietPi-Update | Got valid latest version: 8.7.1
[  OK  ] DietPi-Update | Update available:
[ INFO ] DietPi-Update | Current version : v8.5.0
[ INFO ] DietPi-Update | Latest version  : v8.7.1

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Checking for update pre-requirements

[  OK  ] DietPi-Update | DietPi-Userdata validation: /mnt/dietpi_userdata
[  OK  ] DietPi-Update | Free space check: path=/ | available=13845 MiB | required=100 MiB
[ SUB1 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[  OK  ] DietPi-Services | stop : webmin
[  OK  ] DietPi-Services | stop : minidlna
[  OK  ] DietPi-Services | stop : smbd
[  OK  ] DietPi-Services | stop : nmbd

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Applying pre-patches

[  OK  ] DietPi-Update | Downloading pre-patches
[  OK  ] DietPi-Update | Applying execute permission
[  OK  ] DietPi-Update | Successfully applied pre-patches

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Upgrading APT packages

[ INFO ] DietPi-Update | APT update, please wait...
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye-updates InRelease
Hit:3 http://deb.debian.org/debian-security bullseye-security InRelease
Hit:4 http://deb.debian.org/debian bullseye-backports InRelease
Hit:5 https://archive.raspberrypi.org/debian bullseye InRelease
Ign:6 https://download.webmin.com/download/repository sarge InRelease
Hit:7 https://download.webmin.com/download/repository sarge Release
Reading package lists...
[  OK  ] DietPi-Update | APT update
[ INFO ] DietPi-Update | APT upgrade, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[  OK  ] DietPi-Update | APT upgrade

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Installing new DietPi code

[  OK  ] DietPi-Update | Downloading update archive
[  OK  ] DietPi-Update | Unpacking update archive
[  OK  ] DietPi-Update | Removing unused files
[  OK  ] DietPi-Update | Hardening update archive mode
[  OK  ] DietPi-Update | Installing new DietPi scripts
[  OK  ] DietPi-Update | Installing new DietPi system files
[ SUB1 ] DietPi-Set_software > verify_dietpi.txt
[  OK  ] DietPi-Set_software | Downloading current dietpi.txt
[  OK  ] DietPi-Set_software | Added setting CONFIG_CHECK_CONNECTION_IPV6=2620:fe::fe to end of file /boot/dietpi.txt
[  OK  ] verify_dietpi.txt  | Completed

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Applying incremental patches

[ INFO ] DietPi-Update | Current version : v8.5.0
[ INFO ] DietPi-Update | Latest version  : v8.7.1
[ INFO ] DietPi-Patch | Patching to DietPi v8.6...
[  OK  ] DietPi-Patch | Patched to DietPi v8.6
[ INFO ] DietPi-Patch | Patching to DietPi v8.7...
[  OK  ] DietPi-Patch | Patched to DietPi v8.7
[ INFO ] DietPi-Update | APT autopurge, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[  OK  ] DietPi-Update | APT autopurge
[  OK  ] DietPi-Update | Incremental patching to v8.7.1 completed
[ INFO ] DietPi-Update | Checking for new available live patches

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Completed

[ INFO ] DietPi-Update | Current version : v8.7.1
[ INFO ] DietPi-Update | Latest version  : v8.7.1
[  OK  ] DietPi-Survey | Purging survey data
[ SUB1 ] DietPi-Services > restart
[  OK  ] DietPi-Services | restart : nmbd
[  OK  ] DietPi-Services | restart : smbd
[  OK  ] DietPi-Services | restart : minidlna
[  OK  ] DietPi-Services | restart : webmin
[  OK  ] DietPi-Services | restart : cron
root@RasPi4:~#

Now I switched time sync from custom to default successful.

Many thanks at all and love greetings.

This is still relevant. I installed dietpi yesterday. Today I can’t apt update without certificate issues.
Reinstalling ca-certificates doesn’t work either. Even switching to http doesn’t work:

root@DietPi:/etc/apt/sources.list.d# apt-get update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
Hit:3 http://archive.raspberrypi.org/debian bullseye InRelease
Get:4 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Hit:5 http://deb.debian.org/debian bookworm-backports InRelease
Reading package lists... Done
E: Release file for http://deb.debian.org/debian-security/dists/bookworm-security/InRelease is not valid yet (invalid for another 44min 58s). Updates for this repository will not be applied.

EDIT: Nevermind, it was due to my config using the UTC timezone when I would need to set it to Berlin properly. There is also a way to disable the check: sudo apt update error: "Release file is not yet valid" - Ask Ubuntu Although, is this even safe? Can’t I tell it to validate for UTC instead?

You need to set correct system time to have a valid certificate verification. Ensure NTP is configured correct and time sync finished successfully.

1 Like

NTP is working, the time was right, but the timezone was wrong. It makes no sense why it would fail. I literally just changed the timezone to my one, so that the hours would update respectively, but the time is the same.

On all my servers I use UTC timezone despite their varying location and never faced this issue, except on DietPi.