Skip to content

gemini-invoke workflow contents permission issue #382

Closed

Description

@gitrey

Hi Team,
I've created a new repo and went through setup with /setup-github Gemini CLI command.

Created new issue and asked gemini-cli to fix it. On approving the plan I got this error message:

I encountered an error while trying to create a new branch. The GitHub App does not have the required write permission for the repository's contents.

To resolve this, please update the .github/workflows/gemini-invoke.yml workflow file and change the contents permission from read to write.

permissions:
  contents: 'write' # <-- Change this from 'read' to 'write'
Image

After making the change and approving the plan again, workflow execution failed with this error:

[Invalid workflow file: .github/workflows/gemini-dispatch.yml#L154](https://github.com/gitrey/gemini-cli-github-action/actions/runs/18877846797/workflow)

The workflow is not valid. .github/workflows/gemini-dispatch.yml (Line: 154, Col: 3): 
Error calling workflow 'gitrey/gemini-cli-github-action/.github/workflows/gemini-invoke.yml@abfc54bdfcff343aaf47f5fe0b730c9e72798a73'. 
The nested job 'invoke' is requesting 'contents: write', but is only allowed 'contents: read'.

Activity

  1. reopened this on Nov 7, 2025
  2. gemini-cli commented on Nov 7, 2025

    @gemini-cli
    Contributor

    🤖 Hi @jerop, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

  3. gemini-cli commented on Nov 7, 2025

    @gemini-cli
    Contributor

    🤖 I'm sorry @jerop, but I was unable to process your request. Please see the logs for more details.

  4. jerop commented on Jan 14, 2026

    @jerop
    Contributor

    @gemini-cli /triage

  5. gemini-cli commented on Jan 14, 2026

    @gemini-cli
    Contributor

    🤖 Hi @jerop, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

  6. jerop commented on Jan 14, 2026

    @jerop
    Contributor

    @gemini-cli /triage

  7. gemini-cli commented on Jan 14, 2026

    @gemini-cli
    Contributor

    🤖 Hi @jerop, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

  8. added a commit that references this issue on Feb 24, 2026
    5b4d318
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions