Skip to content

gh issue create with project fails when permissions haven't been assigned #8798

Open

Description

@henrygriffiths

Describe the bug

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

  1. 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

Activity

  1. added
    bug
    on Mar 7, 2024
  2. added
    needs-triage
    on Mar 7, 2024
  3. added
    gh-issue
    on Apr 30, 2024
  4. stanojaros commented on Jun 26, 2024

    @stanojaros

    hi, is there any update on this bug? I have a simillar problem when trying to add project with command gh issue edit

  5. mattclay commented on Nov 1, 2024

    @mattclay

    Running gh auth refresh -s project updates the token used and allows issues to be assigned to projects.

  6. henrygriffiths commented on Nov 1, 2024

    @henrygriffiths
    Author

    Running gh auth refresh -s project updates the token used and allows issues to be assigned to projects.

    Correct, it does fix the issue, however the error message given by the gh cli is still incorrect.

  7. ElijahLynn commented on Dec 12, 2024

    @ElijahLynn

    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.

  8. Neudrino commented on Jan 10, 2025

    @Neudrino

    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"
    

    Also see:

  9. cli-triage commented on Jul 9, 2026

    @cli-triage

    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.

    Generated by Issue Triage (skills-driven) · 21.1 AIC · ⌖ 6.5 AIC · ⊞ 5K · ◷

  10. added
    priority-3
    and removed
    needs-triage
    on Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggh-issuepriority-3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions