Skip to content
This repository was archived by the owner on Sep 27, 2026. It is now read-only.
This repository was archived by the owner on Sep 27, 2026. It is now read-only.

attest: fall back to gh auth token when no GITHUB_TOKEN is set #8

Closed

Description

@LopezAdan

greentree attest exits 15 with "no GREENTREE_GITHUB_TOKEN or GITHUB_TOKEN in the environment" in an environment where gh is fully authenticated — the very next command, gh pr create, succeeded. Since attest already assumes a GitHub remote, it could try gh auth token (the documented way to lend gh's credential to other tools) before giving up, or say in the error that GITHUB_TOKEN=$(gh auth token) greentree attest works. Hit on Tako-Research/reachpad-infra, 2026-08-13, commit a15c382.

🤖 Generated with Claude Code

Activity

  1. LopezAdan commented on Aug 13, 2026

    @LopezAdan
    ContributorAuthor

    Duplicate of #4, fixed in #9 (merged to main today): token resolution is now GREENTREE_GITHUB_TOKEN → GITHUB_TOKEN → gh auth token --hostname github.com (5s timeout, source logged, never the value), and the exit-15 error enumerates all three sources. Reinstall from main (cargo install --path .) to pick it up — the GITHUB_TOKEN=$(gh auth token) workaround is no longer needed.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions