GitHub CLI 2.101.0
新功能 2 項
Linux 上用 APT 或 RPM 裝的 gh 要認新金鑰
你在 Linux 上更新 gh,卻突然裝不起來、報簽章驗證失敗?多半是金鑰換了。GitHub CLI 的 APT 與 RPM 套件庫(Linux 下載與更新軟體的官方來源),連同個別的 RPM 套件檔,現在只用新的 PGP 金鑰簽署,指紋是 7F38BBB59D064DBCB3D84D725612B36462313325。如果你在 2026 年 4 月 8 日前從官方 APT 或 RPM 套件庫裝了 gh,又還沒更新金鑰圈(電腦裡記著哪些簽章可以信任的清單),安裝或更新就可能失敗。⟦就像快遞改用新封條,你家警衛只認得舊封條,包裹就會被擋在門外,得先把新封條的樣子告訴警衛。⟧照官方的 PGP 簽章金鑰輪換說明檢查、更新金鑰圈就能解決。用 Windows、macOS,或透過 Homebrew、GitHub Releases、其他套件管理器、原始碼安裝的人不受影響。
官方原文
## Linux package repository signing key rotation
GitHub CLI's APT and RPM repositories, along with individual RPM packages, are now signed only with the new PGP key (fingerprint: 7F38BBB59D064DBCB3D84D725612B36462313325)
> [!IMPORTANT]
> Linux users who installed gh from the official APT or RPM repositories before April 8, 2026, and have not refreshed their keyring, may now see package installation or update failures. Follow the [PGP signing key rotation guidance](https://github.com/cli/cli/issues/13118) to check and update your keyring. Users on Windows or macOS, and users who installed gh through Homebrew, GitHub Releases, another package manager, or from source, are not affected.
gh 登入時自動幫你複製驗證碼
用 gh auth login 登入 GitHub,或用 gh auth refresh 更新權限時,畫面會給你一組 OAuth 裝置代碼(要貼到瀏覽器授權頁、證明是你本人在登入的短碼)。以前你得自己反白、複製,再切到瀏覽器貼上;現在這兩個指令預設會直接把代碼放進剪貼簿,切過去按貼上就好。⟦櫃檯人員直接把號碼牌塞到你手上,你就不必再拿筆抄一次號碼。⟧不想要這個行為,可以用下面這行永久關掉:
```shell gh config set clipboard disabled ```
某一次執行時如果你另外指定了剪貼簿選項,那一次就照你指定的來。
官方原文
## Copy authentication codes to the clipboard by default
gh auth login and gh auth refresh now copy OAuth device codes to the clipboard by default, saving a manual copy step during authentication.
To persistently opt out, run:
```shell
gh config set clipboard disabled
```
Explicit clipboard options still take precedence for an individual invocation.