---
title: "CI credentials and uploads"
description: "An ambient variable takes precedence even when its value is empty. Unset it if the file should supply the value. M3 does not interpolate dotenv values."
---

> M3 v0.3.4 · commit 735afab7c12f329ebaa19767b35a72a6bb7c7bb9.


# CI credentials and uploads

## A secret is missing despite `.env` or `--env-file`

An ambient variable takes precedence even when its value is empty. Unset it if
the file should supply the value. M3 does not interpolate dotenv values.

## Upload failed after tests completed

The failure line names the cause and says what to do next:

- `retry with m3 upload RUN_ID`: the M3 server was unreachable or temporarily
  unavailable. Keep the local database and feedback directory and run that
  command with the same project/database.
- `fix the cause and rerun tests`: retrying the same run cannot succeed. For
  example, the server rejected the report, a report exceeded its size limit, or
  the run output contains a credential from the test environment. Fix the
  cause, then rerun the tests with `--upload` to create a new run.

`m3 upload` refuses runs started without `--upload`, runs where pytest did not
exit 0 or 1, and runs whose credential scan did not complete:

```text
m3 upload: run RUN_ID cannot be uploaded: it was not started with --upload, pytest did not exit 0 or 1, or its credential scan failed; rerun the tests with --upload
```

See the [`m3 upload` reference](https://m3.sineframe.com/docs/reference/cli/index.md#m3-upload-run-id) for
every condition.

## Token no longer works

Create a replacement on your organization's **Access tokens** page in the
[M3 account console](https://auth.sineframe.com/account) and update the
`M3_ACCESS_TOKEN` secret in the CI provider. Verify an upload with the
replacement, then revoke the old token on the same page. `m3 auth logout`
only removes the saved CLI credential from your machine; it does not rotate or
revoke any token.
