Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate

Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 135.181.182.36 443]

I get this error when doing sudo apt-get update:

khadas@Khadas:~$ sudo apt-get update
[sudo] password for khadas:
Hit:1 http://ports.ubuntu.com focal InRelease
Hit:2 http://ports.ubuntu.com focal-security InRelease
Ign:3 dl.khadas.com - Index of /repos/vim3/ focal InRelease
Hit:4 http://ports.ubuntu.com focal-updates InRelease
Hit:5 http://ports.ubuntu.com focal-backports InRelease
Err:6 dl.khadas.com - Index of /repos/vim3/ focal Release
Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 135.181.182.36 443]
Reading package lists… Done
E: The repository ‘dl.khadas.com - Index of /repos/vim3/ focal 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.

This is on a fresh install via krescue

khadas@Khadas:~$ cat /etc/os-release
NAME=“Ubuntu”
VERSION=“20.04.2 LTS (Focal Fossa)”

#change https://dl.khadas.com/repos/ to http://dl.khadas.com/repos/

sudo nano /etc/apt/sources.list
1 Like

for Ubuntu on VIM1 users - you may need to do the change https → http in the file /etc/apt/sources.list.d/fenix.list

This worked for me.
Thank you.