Question

How To Fix NO_PUBKEY 77B79B3FFAF7EF65?

I’ve been updating some of our droplets to 22.04 and came across this issue where it mentions: NO_PUBKEY 77B79B3FFAF7EF65. This occurs when I either try to apt update or do-release-upgrade.

I’ve tried some solutions like below and searched around, but realized that the key does not exist: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 77B79B3FFAF7EF65

I assume sks-keyservers.net would’ve worked, but it’s down now and keyserver.ubuntu.com does not have the missing key 77B79B3FFAF7EF65.

Is there a quick solution to this? Since I’ll have to apply the method to multiple droplets.


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.

Accepted Answer

I also stumbled across this issue when running a simple sudo apt-get update on a 20.04 droplet seems like 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 add is depreciated but its a simple one-liner.

I would appreciate some official DO guidance with the best way to update this across all my droplets

I’m experiencing the exact same issue. Can’t seem to be able to find a solution anywhere.

# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 77B79B3FFAF7EF65
Executing: /tmp/apt-key-gpghome.zoN6XXCefP/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 77B79B3FFAF7EF65
gpg: keyserver receive failed: No data

This is ill advised, but I do seem to have found a temporary workaround.

By editing this file:

sudo vim /etc/apt/sources.list.d/digitalocean-agent.list

From this:

deb https://repos.insights.digitalocean.com/apt/do-agent main main

To this:

deb [allow-insecure=yes] https://repos.insights.digitalocean.com/apt/do-agent main main

I was able to get around the issue.

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.