ale*_*oab 13 linux git repository github-cli
尝试使用 apt 包管理器更新 GitHub CLI 失败并出现以下错误:
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
Run Code Online (Sandbox Code Playgroud)
Axi*_*tic 47
您看到此错误是因为此证书的颁发者 ( https://github.com/vilmibm ) 允许其过期。他们表示,这个问题可能不会很快得到解决,或者根本就不会得到解决。您的选择是:
sudo apt install gh --allow-unauthenticated
(请注意,从安全角度来看这不是一个好主意)sudo apt-key del C99B11DEB97541F0 && sudo rm /etc/apt/sources.list.d/github-cli.list
2022年9月7日更新:
现已为此软件包颁发新证书。根据下面 FourDollars 和 Adam Sherwood 的回答,您可以按照这些说明进行修复/更新。
Fou*_*ars 37
您可以再次运行以下命令来修复 GPG 错误。
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
Run Code Online (Sandbox Code Playgroud)
https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian-ubuntu-linux-raspberry-pi-os-apt上有注释。