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_TOKENCommon 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
- Create an access token in DVC Studio.
- Store it as a CI secret and expose it as
DVC_STUDIO_TOKEN. - Re-run so updates reach Studio.
.github/workflows/ci.yml
- name: Run experiment
env:
DVC_STUDIO_TOKEN: ${{ secrets.DVC_STUDIO_TOKEN }}
run: dvc exp runRotate an expired token
Generate a fresh Studio token and update the secret if the current one is revoked.
Terminal
dvc studio loginHow to prevent it
- Keep
DVC_STUDIO_TOKENin 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
DVC "experiment ... failed" (dvc exp) in CIFix DVC "ERROR: Failed to reproduce experiment" (dvc exp run) in CI - an experiment run failed, usually becau…
DVC Google Drive remote authentication failure in CIFix DVC Google Drive remote authentication failures in CI - the interactive OAuth flow cannot run on a headle…
DVC "dvc: command not found" on the runner in CIFix "dvc: command not found" in CI - DVC is not installed on the runner. Install it with pip or the iterative…