Debian 12 - problem updating

I have seen a similar problem with Debian 10 here in the forum, and it was fixed.

Now I get:

Updating debian12xfceExtraPackages
Refreshing package info
Refreshing packages.
Fail to refresh InRelease: https://cli.github.com/packages stable InRelease from gpgv:/var/lib/apt/lists/cli.github.com_packages_dists_stable_InRelease
Refreshed.
W:An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://cli.github.com/packages stable InRelease: The following signatures were invalid: EXPKEYSIG 23F3D4EA75716059 GitHub CLI opensource+cli@github.com, E:Failed to fetch https://cli.github.com/packages/dists/stable/InRelease The following signatures were invalid: EXPKEYSIG 23F3D4EA75716059 GitHub CLI opensource+cli@github.com, E:Some index files failed to download. They have been ignored, or old ones used instead.

Did you get this error after trying to install github CLI tool?
cli/docs/install_linux.md at trunk · cli/cli · GitHub

This will download the gpg key using wget:

	&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \

So it won’t work as is in the template because it doesn’t have the network connection by default.
You need to configure wget to use proxy for it to work:

E.g. change it to:

	&& https_proxy=http://127.0.0.1:8082/ http_proxy=http://127.0.0.1:8082/ wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \

Yes, this cube has GitHub CLI installed.
I tried a manual update, and it gave me that same error.
Next I imported the key as you explained, tried another manual update, and it worked.
Thank you very much.