Issue
apt update
ends up with GPG errors like:
W: https://download.imunify360.com/ubuntu/22.04/slot-2/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Err:17 https://repo.imunify360.cloudlinux.com/imunify360/ubuntu/22.04 jammy InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8C55A6628608CB71
Environment
- Imunify360
- Ubuntu 22.04
Solution
1. It is required to satisfy APT with the needed key installed, yet also worth deleting previous single key and/or it's backup:
mv /etc/apt/trusted.gpg~ /etc/apt/trusted.gpg.d/
cp /etc/apt/trusted.gpg /etc/apt/trusted.gpg.backup
mv /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/
rm /etc/apt/trusted.gpg
2. Adding GPG key for the repository:
wget -O RPM-GPG-KEY-CloudLinux https://repo.imunify360.cloudlinux.com/defense360/RPM-GPG-KEY-CloudLinux
apt-key add RPM-GPG-KEY-CloudLinux
3. Check with the apt update.
Cause
The warnings and errors are typically caused by outdated or missing GPG keys for one or more of the repositories configured on the system. In particular this warning about the key being stored in the legacy trusted.gpg
file while APT now prefers/requires to have individual key files in the trusted.gpg.d/
directory instead of a single file.
Useful links
- https://opensource.com/article/22/9/deprecated-linux-apt-key
- https://cloudlinux.zendesk.com/hc/en-us/articles/8372430364956
Comments
0 comments
Please sign in to leave a comment.