Skip to content

Migrates from "apt-key" managed keys to "[signed-by=.../keyrings/...]"

License

Notifications You must be signed in to change notification settings

kstr0k/migrate-apt-keys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

migrate-apt-keys

Add signing info to sources.list.d Debian apt repos

This script looks at each deb[-src] entry in the specified (or default) SOURCE.list files and

  • adds [signed-by] qualifiers if missing
  • downloads the corresponding gpg key into a designated folder

Background

In recent (~2022) Ubuntu / Debian's, /etc/apt/sources.list.d/ repos signed by system-wide keys from /etc/apt/trusted.gpg trigger an apt update warning. Meanwhile, repos signed by individual /etc/apt/trusted.gpg.d/* keys don't; yet this is mostly security theatre, because the trusted.gpg.d/* keys still apply to all "unsigned" repos.

This script adds a [signed-by] qualifier to each deb[-src] ... entry within each SOURCE.list repo, and downloads all relevant keys into /usr/local/share/keyrings/SOURCE-apt-keyring.gpg (or a specified folder).

Usage

migrate-apt-keys --help
migrate-apt-keys [ KEYRING_FOLDER [SOURCE.list]... ]

Copyright

MIT license: Jens Berthold <[email protected]>, Alin Mr. <[email protected]>

About

Migrates from "apt-key" managed keys to "[signed-by=.../keyrings/...]"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages