4

When doing an apt update i get the following warnings:

sudo apt update 
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease                                                                                                                                                           
...
Err:8 https://cli-assets.heroku.com/apt ./ InRelease                                                   
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 536F8F1DE80F6A35
...
Get:1 http://dl.google.com/linux/chrome/deb stable InRelease [1,811 B]

The upgrade does continue for other packages, but how to resolve this warning?

Ahmed
  • 428

3 Answers3

6

Edit: The key seem to expire again in 22nd April 2024, the key in previous url is still not updated, but they have a new link that seems to work:

https://cli-assets.heroku.com/channels/stable/apt/release.key

previous link:

https://cli-assets.heroku.com/apt/release.key

A quick fix would be:

curl https://cli-assets.heroku.com/channels/stable/apt/release.key | sudo apt-key add 
Ahmed
  • 428
5

The command apt-key is deprecated in Ubuntu 22.04.

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

One must dearmor the key after download. The correct command is:

curl -fsSL https://cli-assets.heroku.com/apt/release.key | sudo gpg --dearmor -o /usr/share/keyrings/heroku-archive-keyring.gpg

This has to be done in conjunction with setting the key file path in the apt source line:

$ cat /etc/apt/sources.list.d/heroku.list 
deb [arch=amd64 signed-by=/usr/share/keyrings/heroku-archive-keyring.gpg] https://cli-assets.heroku.com/apt ./

More detailed info can be found on several technical blogs by now. E.g. https://techviewleo.com/apt-key-is-deprecated-manage-keyring-files-in-trusted-gpg-dot-d/

dlazesz
  • 185
0

It's works for me:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 536F8F1DE80F6A35

TrHH
  • 1