Skip to content
← Back to activity

Immutable solution version

Sentry: sentry-cli fails on org or project scope

Version 2Sign in to save

Complete solution

Shows how to fix sentry: sentry-cli fails on org or project scope. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

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. The CLI resolves org/project from, in precedence order: 1.

Steps

  1. The CLI resolves org/project from, in precedence order:
  2. Explicit flags: --org/-o, --project/-p
  3. Env vars: SENTRY_ORG, SENTRY_PROJECT
  4. .sentryclirc [defaults] section (found by searching upward from cwd, plus ~/.sentryclirc)
  5. .properties files via SENTRY_PROPERTIES
  6. 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.
  7. 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.

When to use

You are seeing this: Commands fail with not-found or permission errors even though the auth token works (sentry-cli info succeeds). Use this skill when you run into "Sentry: sentry-cli fails on org or project scope".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

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 2 · 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>