Skip to content
Latchkey

Turborepo remote cache 401/403 in CI

The remote cache rejected the request. A missing TURBO_TOKEN, the wrong TURBO_TEAM, or an expired credential causes 401 Unauthorized or 403 Forbidden.

What this error means

turbo logs a remote cache warning or error with HTTP 401 or 403, then falls back to local cache only.

turbo
WARNING  failed to contact remote cache: Error making HTTP request:
401 Unauthorized
x remote caching disabled

Common causes

Missing or invalid token

TURBO_TOKEN is unset or revoked, so the cache rejects authentication with 401.

Wrong team slug

TURBO_TEAM points at a team the token cannot access, yielding 403.

Expired credential

A rotated token still referenced in CI no longer authenticates.

How to fix it

Set token and team in CI

  1. Provide TURBO_TOKEN and TURBO_TEAM as secrets matching your remote cache.
workflow.yml
env:
  TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
  TURBO_TEAM: ${{ vars.TURBO_TEAM }}

Verify the credential

  1. Confirm the token is current and scoped to the team.

How to prevent it

  • Self-healing managed runners like Latchkey auto-retry transient cache-endpoint blips; store TURBO_TOKEN and TURBO_TEAM as secrets so auth stays stable for heavy monorepo builds.

Frequently asked questions

What causes ""remote cache 401/403""?
TURBO_TOKEN is unset or revoked, so the cache rejects authentication with 401.
How do I fix "remote cache 401/403"?
Set token and team in CI

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card