Certificate verification failed: The certificate is NOT trusted


update used to work, but now for some reason it doesn’t work.

can you help me?

root@gitlab2:~# curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
Detected operating system as Ubuntu/focal.
Checking for curl…
Detected curl…
Checking for gpg…
Detected gpg…
Running apt-get update… done.
Installing apt-transport-https… done.
Installing /etc/apt/sources.list.d/gitlab_gitlab-ce.list…done.
Importing packagecloud gpg key… done.
Running apt-get update… done.

The repository is setup! You can now install packages.
root@gitlab2:~# apt update
Hit:1 Index of linux/ubuntu/ focal InRelease
Ign:2 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu focal InRelease
Hit:3 Index of /git-core/ppa/ubuntu focal InRelease
Err:4 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu 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: 443]
Hit:5 Index of /ubuntu focal InRelease
Hit:6 Index of /ubuntu focal-updates InRelease
Hit:7 Index of /ubuntu focal-backports InRelease
Hit:8 Index of /ubuntu focal-security InRelease
Reading package lists… Done
E: The repository ‘https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu 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.

Looks like you have two different repositories for gitlab here. Did you make sure to fully remove the old one before upgrade / install?

yes i upgraded and all remove old / install…
Same doesn’t work

Got the same error with yum, see my topic

1 Like