Getting "server certificate verification failed" during apt-get update
I am trying to update a system using an HTTPS package mirror located here:
https://mirror.ufs.ac.za/os/linux/distros/ubuntu/ubuntu/
However, during apt-get update
, I get the following message:
Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
If you visit the site in your browser, you are warned about the site's certificate, but I trust the site, so it's not an issue for me. I assume I must be able to add this exception somewhere for apt to proceed.
Can you tell me where and how?
Solution 1:
After reading up on the matter, following a trail about "self-signed certificates" etc., I found a suitable answer in a question on Serverfault: https://serverfault.com/questions/340887/using-a-self-signed-ssl-cert-for-an-https-based-internal-apt-repository
By adding the following line to my apt.conf
, it resolved the matter:
Acquire::https::mirror.ufs.ac.za::Verify-Peer "false";
But keep in mind, that "resolved" means, that it might "work" now. Disabling verification is rather a workaround.