Skip to content

gh attestation trusted-root requires auth #9614

Closed

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.

Activity

  1. added
    bug
    on Sep 12, 2024
  2. added
    needs-triage
    on Sep 12, 2024
  3. removed
    needs-triage
    on Sep 12, 2024
  4. added
    gh-attestation
    on Sep 16, 2024
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-attestation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions