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 create with project fails when permissions haven't been assigned #8798
When creating an issue without the project permissions, the command fails stating could not add to project: 'Project Name' not found
Steps to reproduce the behavior
Run `gh pr issue create --title "Issue Title" --body "" --project "Project Name" without the projects permission
Expected vs actual behavior
The command returned the result could not add to project: not found. When running the project command, it returns the error error: your authentication token is missing required scopes [read:project]
Since the issue is the same, the permission has not been granted, the error should be the same.
Logs
$ gh issue create --title "Issue Title" --body "" --project "Project Name"
Creating issue in ***/***
could not add to project: 'Project Name' not found
Sweet, gh auth refresh --scopes [PROJECT] fixed our issue. Agreed, that the error needs to be clearer. I had to search this issue queue for that error to understand the scopes needed to be updated.
The workaround apparently only works for local execution.
Is there any way to have a Github Actions pipeline access the (new) Github Projects?
Minimal example:
name: Create tickets within project
on: [push]
env:
GH_TOKEN: ${{ github.token }}
jobs:
setup-projects-and-issues:
permissions: write-all # this should give all permissions also to projects
runs-on: ubuntu-latest
steps:
- run: |
project_title="Demo Project"
gh project create --title "${project_title}"
# If you create a project with the `project_title` via web GUI, the following line still fails.
gh issue create --title "Issue title" --add-project "${project_title}"
# In contrast creating an issue without project access works.
gh issue create --title "Issue title"
This is a confirmed bug with a misleading error message: when the read:project auth scope is missing, gh issue create --project reports could not add to project: 'Project Name' not found instead of surfacing the actual permission problem. I'm suggesting priority-3 since the root cause is an error-message quality issue — the underlying behavior (blocking the operation due to missing scope) is correct, and the workaround is simply running gh auth refresh -s read:project. Related: #8326 tracks a similar confusing-error-with-missing-project-scope pattern on gh project copy, but that's a separate command so this is not a duplicate.
Activity
stanojaros commentedon Jun 26, 2024
hi, is there any update on this bug? I have a simillar problem when trying to add project with command gh issue edit
mattclay commentedon Nov 1, 2024
Running
gh auth refresh -s projectupdates the token used and allows issues to be assigned to projects.henrygriffiths commentedon Nov 1, 2024
Correct, it does fix the issue, however the error message given by the gh cli is still incorrect.
ElijahLynn commentedon Dec 12, 2024
Sweet,
gh auth refresh --scopes [PROJECT]fixed our issue. Agreed, that the error needs to be clearer. I had to search this issue queue for that error to understand the scopes needed to be updated.Neudrino commentedon Jan 10, 2025
The workaround apparently only works for local execution.
Is there any way to have a Github Actions pipeline access the (new) Github Projects?
Minimal example:
Also see:
cli-triage commentedon Jul 9, 2026
This is a confirmed bug with a misleading error message: when the
read:projectauth scope is missing,gh issue create --projectreportscould not add to project: 'Project Name' not foundinstead of surfacing the actual permission problem. I'm suggestingpriority-3since the root cause is an error-message quality issue — the underlying behavior (blocking the operation due to missing scope) is correct, and the workaround is simply runninggh auth refresh -s read:project. Related: #8326 tracks a similar confusing-error-with-missing-project-scope pattern ongh project copy, but that's a separate command so this is not a duplicate.