Question

Certificate verification error after installing certbot when trying to update.

After running Certbot on my Ubuntu VPS, I began receiving this error when running apt update:

Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:2 http://mirrors.digitalocean.com/ubuntu jammy InRelease
Hit:3 http://mirrors.digitalocean.com/ubuntu jammy-updates InRelease
Ign:4 https://repos.insights.digitalocean.com/apt/do-agent main InRelease
Hit:5 http://mirrors.digitalocean.com/ubuntu jammy-backports InRelease
Hit:6 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease
Ign:4 https://repos.insights.digitalocean.com/apt/do-agent main InRelease
Ign:4 https://repos.insights.digitalocean.com/apt/do-agent main InRelease
Err:4 https://repos.insights.digitalocean.com/apt/do-agent main InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 205.185.216.10 443]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
14 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch https://repos.insights.digitalocean.com/apt/do-agent/dists/main/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 205.185.216.10 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.

The closest I could find to this problem being talked about on here is this post from August: https://www.digitalocean.com/community/questions/how-to-get-rid-of-server-certificate-verification-failed.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
November 24, 2023

Heya,

The error you’re encountering during apt update is related to a certificate verification failure for the DigitalOcean’s repository, specifically for the DO-Agent. This issue is often due to a problem with the SSL certificate of the repository server or an outdated CA certificates package on your system. Here’s how you can address this problem:

wget -qO- https://repos-droplet.digitalocean.com/install.sh | sudo bash

That should resolve it and let you continue your updates.

Bobby Iliev
Site Moderator
Site Moderator badge
March 10, 2023

Hi there,

It looks like that the problem is the do-agent repository, the question that you’ve shared is related to an Nginx problem.

What you could try is to try upgrading the do-agent with:

wget -qO- https://repos-droplet.digitalocean.com/install.sh | sudo bash

Let me know how it goes!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel