lynis
lynis copied to clipboard
Ubuntu 22.04 - apt-key is deprecated. Manage keyring files in trusted.gpg.d instead
Describe the bug When following the install guide for Ubuntu (https://packages.cisofy.com/community/#debian-ubuntu) the public key is added using apt-key. But apt-key will display deprecation warnings. Can the docs be updated to include a working method for using gpg on Ubuntu 22.04 LTS
Version
- Distribution Ubuntu 22.04 TLS
- Lynis version (latest)
See https://wiki.debian.org/DebianRepository/UseThirdParty, e.g
echo "deb [signed-by=/usr/share/keyrings/keys/cisofy-software-public.gpg] https://packages.cisofy.com/community/lynis/deb/ stable main" | sudo tee /etc/apt/sources.list.d/cisofy-lynis.list
Here is a solution
wget -O - https://packages.cisofy.com/keys/cisofy-software-public.key|sudo gpg --dearmour -o /usr/share/keyrings/lynis.gpg
And
echo "deb [signed-by=/usr/share/keyrings/keys/lynis.gpg] https://packages.cisofy.com/community/lynis/deb/ stable main" | sudo tee /etc/apt/sources.list.d/cisofy-lynis.list
This is what worked for me:
curl -fsSL https://packages.cisofy.com/keys/cisofy-software-public.key | sudo gpg --dearmor -o /usr/share/keyrings/lynis.gpg
echo "deb [signed-by=/usr/share/keyrings/lynis.gpg] https://packages.cisofy.com/community/lynis/deb/ stable main" | sudo tee /etc/apt/sources.list.d/cisofy-lynis.list