sentry-cli: Authentication error on creating deploy with correct authentication token.

Environment

sentry-cli version: 2.28.5, platform: “linux”, architecture: “x86_64”

Steps to Reproduce

Creating a deploy fails with authentication error.

sentry-cli" "releases" "deploys" "--release" "<.....>" "new" "-e" "production"

Expected Result

new deploy on sentry

Actual Result

Authentication error. Unrecognized auth token format!

response: body: {“projects”:[“Insufficient access to project”]}

It’s not an auth error because before I try to create the deploy I can successfully create a new release and upload the sourcemap with the same authentication token.

I think this started with todays release, last week there were no issues at all.

Anyone else have the same issue or knows how to solve it?

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Reactions: 7
  • Comments: 24 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Would anyone here be able to confirm whether 2.28.6 fixes the problems you were experiencing with 2.28.5?

I can confirm that 2.28.6 fixed it:

This script will automatically install sentry-cli (latest) for you.
Installation path: /usr/local/bin/sentry-cli
Warning: this script is currently running as root. This is dangerous. 
         Instead run it as normal user. We will sudo as needed.
######################################################################## 100.0%
Installed sentry-cli 2.28.6
Done!
Created release 4abe1d72124448205d57a6f023faea11ea26f0b9
+------------------------+--------------+
| Repository             | Revision     |
+------------------------+--------------+
| <<redacted>>           | 4abe1d721244 |
+------------------------+--------------+
Finalized release 4abe1d72124448205d57a6f023faea11ea26f0b9
Created new deploy unnamed for 'acceptance'

Hello, I have the same error. It seems there is no sufficient rights with our actual tocken. It works with 2.28.0 but fails for 2.28.4 and 2.28.5 (no tries for intermediary versions).

Changed “Project” permissions from “No Access” to “Read & Write” (have not try “Read” only) resolve the problem.

The supplied SENTRY_AUTH_TOKEN is a Custom Integration token on Organization level with scopes: org:read, project:releases. (It reads Project: No access in the scope settings table above)

Thank you @janpapenbrock for providing this information – it is exactly what I needed to be able to reproduce the issue on version 2.28.5. I now should have all the information I need to be able to implement and test a permanent solution to this problem, so I will close this issue in favor of #1927

I can confirm this for us as well. Was failing for 2.28.5.

Regenerating the global organization AUTH_TOKEN fixed the issue for us.

For example in this part of docs it specifically mentions only Release & Organization permissions. https://docs.sentry.io/product/releases/setup/release-automation/circleci/ Same for other integrations that are not one-step.