+1 vote
in Operating Systems by (60.0k points)

I am getting the following warning message when I run the "apt update" command on the Debian 12 terminal. How to fix this issue?

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https:// nginx.org/packages/mainline/debian bookworm InRelease: The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key <signing-key@nginx.com> W: Failed to fetch https:// nginx.org/packages/mainline/debian/dists/bookworm/InRelease The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key <signing-key@nginx.com> W: Some index files failed to download. They have been ignored, or old ones used instead.

1 Answer

+2 votes
by (75.9k points)
selected by
 
Best answer

As given in the warning message, Nginx GPP key in not valid as it expired. You need to fetch new GPG key from the Nginx website.

Here are the steps to fix this warning message:

  • Run the following command on the terminal to download the new Nginx GPG Key and add it to your keyring:

curl -fsSL https ://nginx.org/keys/nginx_signing.key | sudo gpg --dearmor -o /usr/share/keyrings/nginx-archive-keyring.gpg

  • Run the following command on the terminal to modify the Nginx repository configuration to use the new key:

echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https ://nginx.org/packages/mainline/debian/ bookworm nginx" | sudo tee /etc/apt/sources.list.d/nginx.list

  • Refresh the package list using the following command to use the new Nginx GPG key: 

apt update

There is a space between "https" and ":", remove the space before using these commands. 


...