Question

Cannot get updates Ubuntu 20.04

sudo apt-get update
Hit:1 https://repos.insights.digitalocean.com/apt/do-agent main InRelease
Get:2 http://mirrors.digitalocean.com/ubuntu focal InRelease [265 kB]          
Hit:3 http://mirrors.digitalocean.com/ubuntu focal-updates InRelease           
Hit:4 http://mirrors.digitalocean.com/ubuntu focal-backports InRelease         
Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]      
Get:6 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease [5518 B]
Hit:7 https://download.docker.com/linux/ubuntu focal InRelease                 
Err:6 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
Fetched 384 kB in 1s (411 kB/s)
Reading package lists... Done
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-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.

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.

Hi,

I ran into this problem today also. I do not know what changed that necessitated this, but this resolved it for me:

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

Several other methods of adding the key did not work. For whatever reason, only the above did.

Thanks, Vishnu

To fix this I had to fully remove and re-install the digital ocean agent, which meant:

  1. sudo dpkg --configure -a
  2. sudo apt-get remove droplet-agent
  3. sudo rm /etc/apt/sources.list.d/droplet-agent.list
  4. sudo apt-get update
  5. wget -qO- https://repos-droplet.digitalocean.com/install.sh | sudo bash

use this to update the key:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <your key here>