Skip to content

workflow-next-reset@v4: unauthenticated git ls-remote exit 128 on PRIVATE repos → next/hotfixes never reset after a release #194

Closed

Description

@Shinrai

Problem

workflow-next-reset.yml@v4's "sync / ⏳ Wait for the released major tag to roll forward" job runs, in the tag-gate loop:

sha=$(git ls-remote "https://github.com/${REPO}.git" "refs/tags/${tag}^{}" 2>/dev/null | awk '{print $1}')

against a bare, unauthenticated HTTPS URL. On a private repo that git ls-remote returns exit 128 (auth required). The step runs under bash --noprofile --norc -e -o pipefail, and the 2>/dev/null hides the real message, so the non-zero status silently kills the job. Because this gate job fails, the downstream reset-next / reset-hotfixes job is skipped — so next (and hotfixes) are never recreated after a release.

Public repos pass this line fine (anonymous ls-remote works), which is why this only bites private repos.

Evidence

  • cpm (private) — run 30783376195: log shows ⏳ Gating on @v1… immediately followed by ##[error]Process completed with exit code 128. next/hotfixes absent afterward.
  • gh-broker (private) — next-reset failed on both releases: v0.2.0 (run 30773285378) and v0.2.1 (run 30778280943).
  • Public released repos (envm, polyfillme, jsonv-vscode) do not hit this.

Downstream impact (confirmed)

With next missing, the next feature push can't open its PR: feature-pr does git fetch --quiet origin "next" and dies with fatal: couldn't find remote ref next (cpm run 30783469722). So after any private-repo release, the staging flow is stuck until next/hotfixes are recreated by hand.

Fix

The job already has a token (GITHUB_TOKEN Permissions: Contents: write); the ls-remote just doesn't use it. Options, best first:

  1. Authenticate the lookup — git ls-remote "https://x-access-token:${GH_TOKEN}@github.com/${REPO}.git" …, or replace it with gh api repos/${REPO}/git/ref/tags/${tag}.
  2. Make the gate non-fatal — the tag-roll-forward wait is only a safety delay; a lookup failure should degrade to "proceed anyway", not abort the reset (e.g. || true and don't let pipefail kill it).
  3. Drop the 2>/dev/null (or log on failure) so this is diagnosable next time.

(1)+(3) is the clean fix; (2) is a cheap safety net on top.

Repos needing manual next/hotfixes recreation now (post-release, private)

  • cpm, gh-broker — confirmed missing.
  • memcache — private + released; verify.

Recreate with git push origin master:next master:hotfixes once the workflow fix is in (otherwise the next release re-breaks them).

Activity

  1. added
    type: bug
    priority: high
    type: ci
    on Aug 3, 2026
  2. cldmv-bot commented on Aug 3, 2026

    @cldmv-bot
    Contributor

    Closed in v4.18.4 — resolved by #195.

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

    priority: hightype: bugtype: ci

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions