Skip to content
Latchkey

cargo publish "a verified email address is required" in CI

crates.io requires the publishing account to have a verified email address, and the account tied to your CI token has not confirmed one. The token is valid; the account just needs a verified email.

What this error means

cargo publish fails with "error: failed to publish" and "the remote server responded with an error: A verified email address is required to publish crates to crates.io. Visit https://crates.io/settings/profile to set and verify your email address."

cargo
error: api errors (status 200 OK): A verified email address is required to publish crates to crates.io. Visit https://crates.io/settings/profile to set and verify your email address.

Common causes

The crates.io account has no verified email

The account that owns the API token never confirmed an email. crates.io blocks publishing until a verified address is on file.

A bot/automation account set up without email confirmation

A dedicated publishing account created for CI may have skipped the email verification step.

How to fix it

Verify the account email on crates.io

  1. Sign in to crates.io as the account whose token CI uses.
  2. Open profile settings and set an email address.
  3. Click the confirmation link sent to that address, then re-run the publish.

Confirm CI uses that verified account token

Make sure the CARGO_REGISTRY_TOKEN secret belongs to the account you just verified.

.github/workflows/release.yml
- run: cargo publish
  env:
    CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

How to prevent it

  • Verify the email on any crates.io account used to publish.
  • Keep CI tokens tied to a verified, dedicated publishing account.
  • Document which account owns the CARGO_REGISTRY_TOKEN secret.

Related guides

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