apt prints 'Missing Signed-By in the sources.list(5) entry'
N: Missing Signed-By in the sources.list(5) entry for 'http://mirrors.linode.com/ubuntu'Short answer
The notice means a repository entry has no Signed-By option, so apt accepts any key in its global trusted keyrings for it. Find the entry that names the host, store that vendor's key as a file in /etc/apt/keyrings, and add Signed-By pointing to that file in the entry.
Fix it fast
1Find out which cause you have
Search every apt source file for the host named in the notice, to see which file and which format the entry is in.
grep -rn 'mirrors.linode.com' /etc/apt/sources.list /etc/apt/sources.list.d/2Match what you see, then jump to its fix
- 1
N: Missing Signed-By for one host, listed after sudo apt updateThe repository line has no signed-by optionFix - 2
the key sits in /etc/apt/trusted.gpg or /etc/apt/trusted.gpg.d, or was added with apt-keyThe key was added to the global trust storeFix - 3
apt update errors or warnings only for artifacts.elastic.coThe Elasticsearch repository was added in an old wayFix
- 1
What does the error look like?
N: Missing Signed-By in the sources.list(5) entry for 'http://mirrors.linode.com/ubuntu'N: Missing Signed-By
Cause 1 of 3
The repository line has no signed-by option
1Check
Without Signed-By, all keys in the trusted keyrings count as valid signers for the repository. Open the file you found and see whether the entry has the option.
cat /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources2Fix
Put the vendor's key into /etc/apt/keyrings as a binary file, then add Signed-By with that path. In a .sources file it is a line in the stanza; in a one-line .list file it is signed-by inside square brackets.
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://example.com/repo-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/example.gpg
# /etc/apt/sources.list.d/example.sources
Types: deb
URIs: https://example.com/apt
Suites: stable
Components: main
Signed-By: /etc/apt/keyrings/example.gpg3Verify
Run the update again and look for the notice.
sudo apt updateConfirmed by wiki.debian.org
Cause 2 of 3
The key was added to the global trust store
1Check
When no keyring is given, the default is trusted.gpg and everything in trusted.gpg.d. A key placed there is accepted for every repository without Signed-By, not just its own.
ls -l /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/2Fix
Move the vendor key out of the global store into its own keyring file under /etc/apt/keyrings and point only that repository's Signed-By at it. Never place a third-party key in trusted.gpg.d.
# Signed-By in the repository entry, pointing to the vendor's own file
Signed-By: /etc/apt/keyrings/example.gpg3Verify
Update and install from that repository.
sudo apt update && apt-cache policy example-packageConfirmed by manpages.debian.org
Cause 3 of 3
The Elasticsearch repository was added in an old way
1Check
Elastic documents one setup: the key converted with gpg --dearmor into /usr/share/keyrings/elasticsearch-keyring.gpg, and a repository line that uses signed-by. A repository line without it, or a key that is missing, breaks update.
cat /etc/apt/sources.list.d/elastic-*.list2Fix
Redo the setup with Elastic's own steps for the major version you use. Check the current version number on the Elastic page; 9.x is shown there as the example.
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/9.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-9.x.list3Verify
Update the package index and install.
sudo apt-get update && sudo apt-get install elasticsearchConfirmed by elastic.co
How do I stop it coming back?
- Give each third-party repository its own keyring file and its own Signed-By.
- Do not use apt-key add or trusted.gpg.d for third-party keys.
- Keep keys you manage by hand in /etc/apt/keyrings.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Related fixes
Servers
apt cannot verify the Docker repository: public key is not available
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY
apt checks every repository against a signing key.
3 causes, each with a fixServers
dnf cannot install MySQL on Amazon Linux 2023
dnf cannot find a mysql-server package on Amazon Linux 2023
Amazon Linux 2023 documents MariaDB, not MySQL, as its database server, with packages named mariadb105 and mariadb105-server.
3 causes, each with a fixServers
Ansible hangs, then times out waiting for the sudo prompt
a playbook using become seems to hang
Ansible ran sudo on the target and never saw the answer it expected.
3 causes, each with a fixServers
Apache on Ubuntu returns 404 Not Found for my site
The requested URL was not found on this server.
On Ubuntu a 404 from Apache usually means the request maps to a path that has no file.
3 causes, each with a fixServers
Apache returns 504 Gateway Timeout when PHP takes too long
Quick requests work, slow ones end in a 504 after a fixed wait
A 504 from Apache means the backend did not answer within the proxy timeout.
2 causes, each with a fixServers
Apache logs SIGWINCH and exits on its own
the httpd container stops although nothing crashed
SIGWINCH is Apache's graceful-stop signal.
2 causes, each with a fix