Logged in to terminal some time ago and I was persistently offered the option to do-release-upgrade, obviously to Ubuntu 22.04LTS. I wasn’t in a rush, so it is only now that I am trying to do the upgrade. And it won’t!
apt update and apt upgrade both fault that some public keys are not available. For example:
=start=quote= W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repos.insights.digitalocean.com/apt/do-agent main InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 77B79B3FFAF7EF65 W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 35696F43FC7DB4C2 W: Failed to fetch https://repos.insights.digitalocean.com/apt/do-agent/dists/main/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 77B79B3FFAF7EF65 W: Failed to fetch https://repos-droplet.digitalocean.com/apt/droplet-agent/dists/main/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 35696F43FC7DB4C2 W: Some index files failed to download. They have been ignored, or old ones used instead. =end=quote=
apt dist-upgrade resolved some of the package held back issues but still the no public key remains as shown in the quote above
Oh dear! Although apt upgrade and apt dist-upgrade has done all they can, it clearly isn’t enough because do-release-upgrade then responds:
=start=quote= Checking for a new Ubuntu release Please install all available updates for your release before upgrading. =end=quote=
Any ideas on how to progress would be welcome.
Thanks in advance.
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!
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.
The same has been experienced here, https://www.digitalocean.com/community/questions/how-to-fix-no_pubkey-77b79b3ffaf7ef65?comment=192177
Basically, you need to update the keys. There are a couple of ways to go about the problem. DO updated the do-agent apt gpg key on the 5th december. you can see the new one here: https://repos.insights.digitalocean.com/sonar-agent.asc and the old one they have as a backup: https://repos.insights.digitalocean.com/sonar-agent.asc.bkup
i solved this with:
wget -qO - https://repos.insights.digitalocean.com/sonar-agent.asc | sudo apt-key add -
its worth noting
apt-key addis depreciated but its a simple one-liner.
Another way to go about this is to follow these steps:
sudo dpkg --configure -a
sudo apt-get remove droplet-agent
sudo rm /etc/apt/sources.list.d/droplet-agent.list
sudo apt-get update
wget -qO- https://repos-droplet.digitalocean.com/install.sh | sudo bash