Fix Unverified Repository

Scenario: You have added a new repository to the “sources.list” file in “/etc/apt/“, but when you run “apt-get update” it refuse to use your added list. All you get back is a “GPG error: NO_PUBKEY” warning, and that your added repository has been disabled by default.

I have noticed several places online that says you can override the settings by adding “–allow-unauthenticated“, which is true. This on the other hand does not work anymore (at least not in the newer versions of Debian based distros).

The Solution

To solve the issue is quite easy.
All you need to add is a tiny string of text in your “sources.list” file.
Open the file with a terminal text editor;

nano /etc/apt/sources.list

after the word “deb” in the beginning, add the phrase; “[trusted=yes]”

Now, run the “apt-get update” command again.
Hopefully your error should be solved.

NB! – NB! – NB! – NB!

DigitalBrekke is not responsible for any damage to your system/software that may occur.
It’s NOT recommended to use unsigned Repositories
but sometimes we just have to.
What you choose to do is on you!