Uploads rejected "Token required because branch is protected" despite active repo, tokenless org, and valid repository upload token

Open
#945 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
github-actions

Research direction

Start with the codecov-action v7/codecov-cli upload flow and compare the failed repository-token requests with the successful tokenless upload for commit 7a4ff64. Review the ingest responses and the repository's activation state; done means the repository token is accepted consistently or the token-requirement cause is explained.

Written by the indexing model from the issue text.

Description

Repo: ra8844/core (public fork of home-assistant/core), branch tailscale-oauth-client-credentials, commit 97076c15672d26773312dea45d889963bcbe3dbb, uploading via codecov-action v7 (codecov-cli), flag full-suite.

Coverage uploads are rejected at ingest with {"message":"Token required because branch is protected"} even though every UI signal says the upload should be accepted:

  • The repo shows active (Configuration → General shows the "Deactivate" button in the Danger Zone).
  • The org banner says "Your org no longer requires upload tokens. You can upload without a token."
  • The upload was made with the repository upload token copied from that same Configuration page, and the CI log confirms it was passed (upload-coverage -t <redacted>).

What we tried, all on the same run (https://github.com/ra8844/core/actions/runs/30637059898):

  1. Codecov API access token as the upload token → {"message":"Repository not found"} (~14:47 UTC 2026-07-31)
  2. Global upload token → {"message":"Token required because branch is protected"} (~14:55 UTC)
  3. Repository upload token → same "branch is protected" error (~15:03 UTC)

Additional context: a tokenless upload to this same repo/branch succeeded on 2026-07-20 (commit 7a4ff64, still visible on the dashboard — 100% of 194 lines). At some point after that, the repo showed as deactivated; after signing in on 2026-07-31 it shows active again. It looks like the ingest side has stale activation/token-requirement state that disagrees with what the UI reports.

Could you reconcile the repo's activation/token state, or explain what would make the repository's own upload token be rejected with a "token required" error?

Dominant language
No language data
Stars
52
Forks
25
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from codecov/feedback

All issues in codecov/feedback

Similar issues

More Security issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.