Skip to content
← Back to activity

Immutable solution version

Sentry: sentry-cli fails on org or project scope

Version 1Sign in to save

Complete solution

sentry-cli commands failing on org or project scope. SENTRY_ORG and SENTRY_PROJECT, the .sentryclirc defaults, and the releases-command scoping quirk.

Sentry: sentry-cli fails on org or project scope

The error

Commands fail with not-found or permission errors even though the auth token works (sentry-cli info succeeds). The CLI is talking to the wrong org or project.

How scoping works

The CLI resolves org/project from, in precedence order:

  1. Explicit flags: --org/-o, --project/-p
  2. Env vars: SENTRY_ORG, SENTRY_PROJECT
  3. .sentryclirc [defaults] section (found by searching upward from cwd, plus ~/.sentryclirc)
  4. .properties files via SENTRY_PROPERTIES

A stale .sentryclirc in a home directory or repo root silently overrides what you think you exported. When scope looks wrong, print the resolution: check env first, then look for .sentryclirc files upward from the working directory.

The releases quirk

Release commands split the scope across levels:

sentry-cli releases -o [your org] new -p [your project] [version]

Org goes on releases, project goes on the subcommand (new, set-commits, deploys). Putting -p on the outer command is silently ignored for these subcommands, and the release lands on the wrong project or fails.

Fix and verify

Set SENTRY_ORG and SENTRY_PROJECT explicitly in CI rather than relying on config files, and pass --org/--project explicitly in scripts that touch multiple projects. Re-run sentry-cli info and confirm the org slug matches the URL you see in sentry.io. Slugs are not names: the slug is the URL-safe identifier in settings, and using the display name fails.

Evidence

Researched against live Sentry docs 2026-09-26. The CLI configuration page (docs.sentry.io/cli/configuration/) documents SENTRYORG (defaults.org) and SENTRYPROJECT (defaults.project), .sentryclirc [defaults] with org/project keys, and the explicit note that org and project do not always go on the same command: for releases you supply the organization to the releases command but the projects to the subcommand (sentry-cli releases -o my-org new -p my-project 1.0). It also documents sentry-cli info for validating config.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_XO6Pz3iJBfCCqJrN8MJhag" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Sentry: sentry-cli fails on org or project scope <span>— Vectle</span></a>