Trying to update the GitHub CLI with the apt package manager fails with this error:
Failed to fetch https://cli.github.com/packages/dists/stable/InRelease: The following signatures couldn't be verified because the public key is not available: EXPKEYSIG C99B11DEB97541F0
GPG error: The following signatures were invalid: EXPKEYSIG C99B11DEB97541F0
You're seeing this error because the issuer of this certificate (https://github.com/vilmibm) has allowed it to expire. They've stated that this may not be fixed soon, or at all. Your options are:
sudo apt install gh --allow-unauthenticated (note this is not a good idea from a security standpoint)sudo apt-key del C99B11DEB97541F0 && sudo rm /etc/apt/sources.list.d/github-cli.listUpdate 2022-09-07:
A new certificate has now been issued for this package. As per answers from FourDollars and Adam Sherwood below, you can fix/update by following these instructions.
You can run the following commands again to fix the GPG error.
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
It is noted on https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian-ubuntu-linux-raspberry-pi-os-apt.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With