Skip to content
Latchkey

DVC Studio token (DVC_STUDIO_TOKEN) missing or invalid in CI

DVC posts experiment and metric updates to DVC Studio using a token from DVC_STUDIO_TOKEN. If it is unset or invalid in CI, Studio sharing fails or is skipped while the pipeline may still run.

What this error means

dvc exp run or a live-metrics step warns or errors that the Studio token is missing or unauthorized, and runs do not appear in DVC Studio.

dvc
ERROR: failed to send updates to Studio: unauthorized, check your DVC_STUDIO_TOKEN

Common causes

The Studio token is not set in CI

The DVC_STUDIO_TOKEN env is absent on the runner, so DVC cannot authenticate to Studio.

The token is expired or revoked

The token authenticates but is no longer valid, so Studio returns unauthorized.

How to fix it

Provide the Studio token from a secret

  1. Create an access token in DVC Studio.
  2. Store it as a CI secret and expose it as DVC_STUDIO_TOKEN.
  3. Re-run so updates reach Studio.
.github/workflows/ci.yml
- name: Run experiment
  env:
    DVC_STUDIO_TOKEN: ${{ secrets.DVC_STUDIO_TOKEN }}
  run: dvc exp run

Rotate an expired token

Generate a fresh Studio token and update the secret if the current one is revoked.

Terminal
dvc studio login

How to prevent it

  • Keep DVC_STUDIO_TOKEN in CI secrets, never committed.
  • Rotate the token on a schedule and update the secret in one place.
  • Treat Studio push as non-blocking if the pipeline must still pass.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →