[Solved] GPG error: https://cli.github.com/packages stable InRelease: EXPKEYSIG C99B11DEB97541F0

Linux Mohit Mozumder

Problem:

I got an error like this i dont know why-

gpg-error-httpscligithubcompackages-stable-inrelease-expkeysig-c99b11deb97541f0


Solution 1:

Just run the following commands -

curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y

Hope this will solve your problem.


Solution 2:

~ Ignore the error and install the package anyway with

sudo apt install gh --allow-unauthenticated

Note: it is not good from security viewpoint


You can do another thing

~Download the latest release and install it manually instead of using apt. If you do this you should also remove the source from your packages list so that you won't see the error on update:

sudo apt-key del C99B11DEB97541F0 && sudo rm /etc/apt/sources.list.d/github-cli.list


Thank you for reading the article. For any other query feel free to contact us.