Skip to content

[bug]Use user-scoped auth for Copilot E2E#1413

Open
stale2000 wants to merge 1 commit into
entireio:mainfrom
stale2000:stale2000/copilot-e2e-auth-token
Open

[bug]Use user-scoped auth for Copilot E2E#1413
stale2000 wants to merge 1 commit into
entireio:mainfrom
stale2000:stale2000/copilot-e2e-auth-token

Conversation

@stale2000

@stale2000 stale2000 commented Jun 11, 2026

Copy link
Copy Markdown

Entire logs: https://entire.io/gh/stale2000/cli/session/019eb4d1-91e3-7633-97e4-689edfb04769

Summary

Fixes the Copilot CLI E2E jobs by using the repo's Copilot-specific secret for Copilot CLI authentication instead of the GitHub Actions installation token.

The failing E2E run showed Copilot CLI failing while loading models with:

GitHub App Server-To-Server Tokens are not supported for this endpoint

That points at the token type passed to Copilot CLI, not git checkout/push auth. The workflow was setting COPILOT_GITHUB_TOKEN to ${{ github.token }}, which is an Actions installation/server-to-server token. Copilot CLI model access needs a supported user-scoped token, matching the existing E2E Isolated Test workflow pattern that already passes secrets.COPILOT_GITHUB_TOKEN.

Targeted Fix

  • Change Copilot E2E workflow env from ${{ github.token }} to ${{ secrets.COPILOT_GITHUB_TOKEN }}.
  • Apply the same change to the Copilot-specific checkpoints-v2 workflow.
  • Add an early missing-secret guard so CI fails with a clear error if the repo secret is absent, without printing the token value.

This intentionally does not change unrelated GITHUB_TOKEN/GH_TOKEN usage, git remotes, checkout auth, or non-Copilot agents.

Verification

  • git diff --check
  • mise run lint

Not run: real Copilot E2E tests, because they invoke an external paid agent.

Copilot CLI now rejects the GitHub Actions installation token when loading models, so the Copilot E2E jobs need the same user-scoped secret already used by the isolated E2E workflow.

The bootstrap guard fails early when the secret is absent, keeping the error actionable without printing the token.

Constraint: Copilot CLI model access does not accept GitHub App server-to-server tokens.

Rejected: Keep using github.token | latest Copilot CLI fails before tests with unsupported server-to-server token.

Confidence: medium

Scope-risk: narrow

Directive: Do not replace unrelated GITHUB_TOKEN usage; this change is only for Copilot CLI authentication.

Tested: git diff --check; mise run lint

Not-tested: Real Copilot E2E run, because it makes paid external agent calls.
Entire-Checkpoint: 6009a8fc1234
@stale2000 stale2000 requested a review from a team as a code owner June 11, 2026 04:20
@stale2000 stale2000 changed the title Use user-scoped auth for Copilot E2E [bug]Use user-scoped auth for Copilot E2E Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant