Heroku gpg issues in ubuntu images

image: ubuntu-2004:202107-02

trying to run sudo apt-get update yields the following error

ircleci@ip-172-28-32-194:~$ sudo apt-get update
Hit:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal-backports InRelease
Get:4 https://cli-assets.heroku.com/apt ./ InRelease [2,895 B]
Hit:5 https://deb.nodesource.com/node_16.x focal InRelease
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:7 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease
Err:4 https://cli-assets.heroku.com/apt ./ InRelease
  The following signatures were invalid: EXPKEYSIG 6DB5542C356545CF Heroku, Inc. <support@heroku.com>
Hit:8 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu focal InRelease
Reading package lists... Done
W: GPG error: https://cli-assets.heroku.com/apt ./ InRelease: The following signatures were invalid: EXPKEYSIG 6DB5542C356545CF Heroku, Inc. <support@heroku.com>
E: The repository 'https://cli-assets.heroku.com/apt ./ InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

This is my first time posting an error so please let me know if I can be more expressive! Thanks!

1 Like

I think this answer on GitHub will help you. It helped me solve my case.