Skip to content

gemini-invoke workflow contents permission issue #382

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

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