You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gh issue view fails with GraphQL deprecation warning for Projects (classic) #11992
gh issue view fails with a GraphQL deprecation warning when querying issues that have project cards.
Steps to reproduce
gh issue view --repo anthropics/claude-code 10115
Error message
GraphQL: Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. (repository.issue.projectCards)
Expected behavior
The command should complete without deprecation warnings, or handle them gracefully.
Additional context
gh issue create works without this warning, suggesting inconsistent GraphQL query implementations
The deprecated field is repository.issue.projectCards
GitHub deprecated Projects (classic) in May 2024
The command should use the new Projects API instead
Reacted by Louis Maddox, Lenz Paul, Noam Tamim, Ben Elan, Delilah Ashley Wu, Will Owens, Langston Barrett, Henare Degan, Gabriel Lucena, River Wu and 6 more
I have encountered a similar issue with viewing PRs:
~/src/infra $ gh pr view
GraphQL: Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. (repository.pullRequests.nodes.0.projectCards)
Version:
~/src/infra $ gh version
gh version 2.45.0 (2025-07-18 Ubuntu 2.45.0-1ubuntu0.3)
https://github.com/cli/cli/releases/tag/v2.45.0
Hey @theojessop 👋 thank you for the additional report 🙏 Could you try upgrading to the latest version please? That version doesn't support the new APIs.
I had been seeing a similar issue with PR edits. Just upgraded, and that seems to have resolved:
gh pr edit 441917 --body "## Summary
Migrates …"
⎿ Error: GraphQL: Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. (repository.pullRequest.projectCards)
Reacted by Babak K. Shandiz, Kynan Ware, Louis Maddox, Cass and Michael Trollan
Using Linux, I was also on 2.45.0. Running the sudo apt install gh did not perform the upgrade as per the instructions. I had to reinstall the keyring by using the initial install command.
I hope that helps anyone.
Reacted by Babak K. Shandiz, Kynan Ware, Ayser Jamshidi, Tomáš Fejfar and Peter Sharpe
Using Linux, I was also on 2.45.0. Running the sudo apt install gh did not perform the upgrade as per the instructions. I had to reinstall the keyring by using the initial install command.
Thanks for the tip, @pookmish. That's right. The official Debian/Ubuntu repository is not in sync with our official repo. Users are encouraged to follow our Debian/Ubuntu installation docs.
Using Linux, I was also on 2.45.0. Running the sudo apt install gh did not perform the upgrade as per the instructions. I had to reinstall the keyring by using the initial install command.
Thanks for the tip, @pookmish. That's right. The official Debian/Ubuntu repository is not in sync with our official repo. Users are encouraged to follow our Debian/Ubuntu installation docs.
I think you may need to ship this latest version to apt, surprised to find I cannot upgrade my package and yet a breaking change was performed that breaks all my PR/issue workflows 😥
Just saw the above comment, now working again on 2.82!
Maybe the change that broke version 2.45.0 should be reverted? Many people will install the latest version from the Ubuntu repo and encounter this problem.
Additionally, our team is too small to ask maintainers to take on active maintainer roles to manage outside packages that we don't officially own.
Of course. That's not what I asked for.
I ask for your trust that the GitHub CLI team have done as much in our power while understanding that every community has unique needs.
Here I'm speaking precisely about a common need: less breakage so that all distros can have a working gh cli for more than 6 months. I understand that it might not be in the hand of the gh cli team (maybe it's just the github api that should be more stable), but that's not something I can evaluate from my position.
I understand that you do your best of course, but maybe resource allocation at github could take that into account? Thanks for all the work anyway!
I couldn't reproduce the issue with APT policy. I tried containers, Multipass/QEMU VMs, and desktop VMs, while installing gh as of our docs (both as a new install and upgrade from an already installed gh from Debian repo).
Since this is a different problem from the OP's, can you please provide us with repro steps and open up a separate issue for it?
I asked Claude to look into it and it found the problem, a source priority issue. This is still a huge mess in my opinion, wasting a lot of people's time for no reason. It's the second time it bites me, through no fault of mine. At the very least, that documentation page should be updated to include an installation procedure that actually works reliably.
Claude's opinion about this, when asked the following question:
❯ But, shouldn't the docs include instructions to change the priority? The procedure they provide works, but installs the wrong version.
● Yes, I agree with you — by outcome, the docs are wrong for anyone on Ubuntu Pro. "Follow these steps, get gh 2.45 from a different repo than the one you just added" is a genuine user-experience failure, and "well actually it's upstream Ubuntu's fault" is not a satisfying answer when the promise of the page is
"here's how to install the current GitHub CLI on Debian/Ubuntu."
Let me separate the two things going on, because they pull in different directions:
The mechanism is Canonical's, not GitHub's. Ubuntu Pro ESM assigns priority 510 to its packages specifically so that security patches win over arbitrary third-party repos that users add — that's a deliberate defence against users accidentally pulling in an unpatched version from a PPA or a third-party mirror.
From Canonical's perspective, their 510-pin is doing its job. The cli/cli docs team can't change that behaviour; it's a property of every Ubuntu Pro system everywhere. Any third-party apt repo for any package also in Ubuntu main/universe has the same problem whenever that package is tracked by ESM, and gh is far
from the only one.
But the outcome is still broken, and the cli/cli docs could and should say something about it. The minimum fix would be a small admonition in the Debian/Ubuntu section along the lines of:
▎ Note: On systems with Ubuntu Pro / ESM enabled, the ESM repo has a higher apt pin priority than the GitHub CLI repo, so apt install gh may install the ESM-backported version (which is the upstream version Ubuntu shipped at the time of the release, with security patches backported but no feature updates). To
▎ force the cli.github.com version, create /etc/apt/preferences.d/github-cli with Package: gh, Pin: origin cli.github.com, Pin-Priority: 600, then re-run sudo apt update && sudo apt install gh. Verify with gh --version.
That's four lines and covers the footgun without the docs team having to write a whole ESM explainer. Alternatively the instructions could end with "verify the installed version with gh --version; if it's older than the latest release listed on this page, see the pinning note" — same destination, less
prescriptive.
Arguments against adding this to the docs, to steelman the other side:
Scope creep. If cli/cli documents every distro's pin-priority gotcha, the install page doubles in length and gets less scannable for the 95% of users on non-ESM systems who would just be confused by the note.
Ubuntu Pro is paid (though free for personal use up to 5 machines), so some docs teams draw the line at "we don't support paid distro add-ons."
The ESM version is, in a sense, "a valid install of gh on Ubuntu" — it just isn't the current gh. From a "you have a working gh" perspective the docs delivered.
I don't find those arguments compelling for this case because:
The page's implicit contract is "after following these steps, you have the GitHub CLI from GitHub's own repo" — that's the whole point of adding the cli.github.com apt source. ESM users come out of it with a binary from a completely different origin, which is a failed expectation even by a charitable reading.
2.45 is old enough to actively misbehave against the current GitHub API (the Projects (classic) GraphQL error we saw isn't cosmetic — it means the binary is making queries against deprecated fields), not just "missing a few features." A user who installed following the docs will hit functional bugs, not just a
version-lag annoyance.
Ubuntu Pro is now free-for-personal-use and on by default on some cloud images. This is not a niche configuration.
So: yes, the docs could reasonably document this, and filing a small issue or PR against cli/cli pointing out the bug-by-outcome would be a legitimate contribution. If you want, I can draft a short issue body you can post to https://github.com/cli/cli/issues/new — something along the lines of "install_linux.md
Debian/Ubuntu instructions don't account for Ubuntu Pro ESM pin priority, resulting in the wrong version being installed" with the apt-cache policy output and the proposed admonition text. Your call — I won't file it without your go-ahead, and if you'd rather just move on with the local fix and let someone else
report it eventually, that's also completely reasonable.
#!/usr/bin/env bash
#
# Fix `gh issue view` failing with:
# GraphQL: Projects (classic) is being deprecated ... (repository.issue.projectCards)
#
# Cause: Ubuntu ships an old gh (2.45.0) that queries the deprecated classic
# Projects field. GitHub now returns that deprecation as a hard error.
# Fix: replace the Ubuntu package with the official GitHub CLI apt repo, which
# carries a current gh that no longer queries projectCards.
set -euo pipefail
echo ">> Current gh:"
gh --version 2>/dev/null | head -1 || echo " (not installed)"
# 1. Remove the Ubuntu-packaged gh so it can't shadow the official one.
echo ">> Removing Ubuntu-packaged gh (if present)..."
sudo apt-get remove -y gh 2>/dev/null || true
# 2. Add GitHub's official apt repository and signing key.
echo ">> Adding official GitHub CLI apt repository..."
sudo mkdir -p -m 755 /etc/apt/keyrings
wget -nv -O- https://cli.github.com/packages/githubcli-archive-keyring.gpg \
| sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg >/dev/null
sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
| sudo tee /etc/apt/sources.list.d/github-cli.list >/dev/null
# 3. Install the current gh from the official repo.
echo ">> Installing current gh..."
sudo apt-get update
sudo apt-get install -y gh
# 4. Verify.
echo ">> New gh:"
hash -r
gh --version | head -1
echo ">> Done. 'gh issue view' should now work without the projectCards error."
Activity
babakks commentedon Oct 22, 2025
Thanks for opening up the issue, @bukzor! 🙏
May ask what version of
ghare you using? Please rungh version.theojessop commentedon Oct 22, 2025
I have encountered a similar issue with viewing PRs:
Version:
BagToad commentedon Oct 22, 2025
Hey @theojessop 👋 thank you for the additional report 🙏 Could you try upgrading to the latest version please? That version doesn't support the new APIs.
beegan commentedon Oct 23, 2025
I had been seeing a similar issue with PR edits. Just upgraded, and that seems to have resolved:
pookmish commentedon Oct 23, 2025
Using Linux, I was also on 2.45.0. Running the
sudo apt install ghdid not perform the upgrade as per the instructions. I had to reinstall the keyring by using the initial install command.I hope that helps anyone.
babakks commentedon Oct 23, 2025
Thanks for the tip, @pookmish. That's right. The official Debian/Ubuntu repository is not in sync with our official repo. Users are encouraged to follow our Debian/Ubuntu installation docs.
harveysanders commentedon Oct 23, 2025
I had the same issue on OSX in v2.63.0, but latest,
v2.82.1is good 🥳lmmx commentedon Oct 24, 2025
I think you may need to ship this latest version toapt, surprised to find I cannot upgrade my package and yet a breaking change was performed that breaks all my PR/issue workflows 😥Just saw the above comment, now working again on 2.82!
BagToad commentedon Oct 24, 2025
Leaving this issue open for a bit since it still seems helpful for people that are finding it 👍
theojessop commentedon Oct 28, 2025
I can confirm that updating to 2.82 fixed the issue for me 👍
vnicolici commentedon Oct 30, 2025
Maybe the change that broke version 2.45.0 should be reverted? Many people will install the latest version from the Ubuntu repo and encounter this problem.
harveysanders commentedon Oct 30, 2025
@vnicolici I believe it's an upstream change from GitHub API, not the
ghCLI tool itself7 remaining items
autra commentedon Nov 22, 2025
Of course. That's not what I asked for.
Here I'm speaking precisely about a common need: less breakage so that all distros can have a working gh cli for more than 6 months. I understand that it might not be in the hand of the gh cli team (maybe it's just the github api that should be more stable), but that's not something I can evaluate from my position.
I understand that you do your best of course, but maybe resource allocation at github could take that into account? Thanks for all the work anyway!
mohssineAboutaj commentedon Nov 22, 2025
i was having the same issue, and i fix it by Unistalling then Installing it again following the steps here
babakks commentedon Nov 24, 2025
Thanks for your feedback, @jamak and @mohssineAboutaj! 🫶
I couldn't reproduce the issue with APT policy. I tried containers, Multipass/QEMU VMs, and desktop VMs, while installing
ghas of our docs (both as a new install and upgrade from an already installedghfrom Debian repo).Since this is a different problem from the OP's, can you please provide us with repro steps and open up a separate issue for it?
bukzor commentedon Dec 4, 2025
Fixed for me on gh 2.83.1. Thanks!
gh pr editshows a deprecation message about Projects instead of letting me edit the PR #12320 as a duplicate of this issuegh issue viewfails due to "Projects (classic) is being deprecated" #12640 as a duplicate of this issuejsanz commentedon Feb 25, 2026
Had this issue with a new Ubuntu 24 LTS install, where following the official instructions did not install the latest version.
sudo apt policy gh gh: Installed: 2.45.0-1ubuntu0.3+esm2 Candidate: 2.45.0-1ubuntu0.3+esm2 Version table: 2.87.3 500 500 https://cli.github.com/packages stable/main amd64 Packages *** 2.45.0-1ubuntu0.3+esm2 510 510 https://esm.ubuntu.com/apps/ubuntu noble-apps-security/main amd64 Packages 100 /var/lib/dpkg/status 2.45.0-1ubuntu0.3 500 500 http://es.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages 500 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages 2.45.0-1build1 500 500 http://es.archive.ubuntu.com/ubuntu noble/universe amd64 PackagesHad to do the following steps (in case anyone gets here) to force
aptto install the latest version:Create a file that increases the priority of
cli.github.com:Install the package and confirm version:
fabd commentedon Apr 11, 2026
This worked. Ubuntu LTS24.04. gh version 2.55 => 2.89.0
I had to copy/paste to terminal the Install script line by line, pasting the whole block didn't work (bash syntax error).
vnicolici commentedon Apr 11, 2026
I just installed gh on a new system a couple of hours ago, using the same steps, and I still experienced the same issue.
Ubuntu 24.04.4 LTS. The gh version that was installed was 2.45.0. The command line used to install it:
vnicolici commentedon Apr 11, 2026
I asked Claude to look into it and it found the problem, a source priority issue. This is still a huge mess in my opinion, wasting a lot of people's time for no reason. It's the second time it bites me, through no fault of mine. At the very least, that documentation page should be updated to include an installation procedure that actually works reliably.
Claude's opinion about this, when asked the following question:
❯ But, shouldn't the docs include instructions to change the priority? The procedure they provide works, but installs the wrong version.
● Yes, I agree with you — by outcome, the docs are wrong for anyone on Ubuntu Pro. "Follow these steps, get gh 2.45 from a different repo than the one you just added" is a genuine user-experience failure, and "well actually it's upstream Ubuntu's fault" is not a satisfying answer when the promise of the page is
"here's how to install the current GitHub CLI on Debian/Ubuntu."
Let me separate the two things going on, because they pull in different directions:
The mechanism is Canonical's, not GitHub's. Ubuntu Pro ESM assigns priority 510 to its packages specifically so that security patches win over arbitrary third-party repos that users add — that's a deliberate defence against users accidentally pulling in an unpatched version from a PPA or a third-party mirror.
From Canonical's perspective, their 510-pin is doing its job. The cli/cli docs team can't change that behaviour; it's a property of every Ubuntu Pro system everywhere. Any third-party apt repo for any package also in Ubuntu main/universe has the same problem whenever that package is tracked by ESM, and gh is far
from the only one.
But the outcome is still broken, and the cli/cli docs could and should say something about it. The minimum fix would be a small admonition in the Debian/Ubuntu section along the lines of:
▎ Note: On systems with Ubuntu Pro / ESM enabled, the ESM repo has a higher apt pin priority than the GitHub CLI repo, so apt install gh may install the ESM-backported version (which is the upstream version Ubuntu shipped at the time of the release, with security patches backported but no feature updates). To
▎ force the cli.github.com version, create /etc/apt/preferences.d/github-cli with Package: gh, Pin: origin cli.github.com, Pin-Priority: 600, then re-run sudo apt update && sudo apt install gh. Verify with gh --version.
That's four lines and covers the footgun without the docs team having to write a whole ESM explainer. Alternatively the instructions could end with "verify the installed version with gh --version; if it's older than the latest release listed on this page, see the pinning note" — same destination, less
prescriptive.
Arguments against adding this to the docs, to steelman the other side:
I don't find those arguments compelling for this case because:
version-lag annoyance.
So: yes, the docs could reasonably document this, and filing a small issue or PR against cli/cli pointing out the bug-by-outcome would be a legitimate contribution. If you want, I can draft a short issue body you can post to https://github.com/cli/cli/issues/new — something along the lines of "install_linux.md
Debian/Ubuntu instructions don't account for Ubuntu Pro ESM pin priority, resulting in the wrong version being installed" with the apt-cache policy output and the proposed admonition text. Your call — I won't file it without your go-ahead, and if you'd rather just move on with the local fix and let someone else
report it eventually, that's also completely reasonable.
everslick commentedon Jun 13, 2026
docs: Add step to install working version on Ubuntu Pro