Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh attestation trusted-root requires auth #9614

@bdehamer

Description

@bdehamer

Describe the bug

The gh attestation trusted-root command does an auth check despite the fact that it doesn't interact with an GH APIs.

Steps to reproduce the behavior

Run gh attestation trusted-root from a GH Actions workflow without providing an auth token.

Expected vs actual behavior

When running in GH Actions, you may see an error like the following:

gh: To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN environment variable. Example:
  env:
    GH_TOKEN: ${{ github.token }}
Error: Process completed with exit code 4.

Since this command doesn't actually interact with any GH APIs, there is no reason to force a token to be present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-attestationrelated to the gh attestation command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions