Open JeremiaAu opened 4 months ago
@JeremiaAu what version of Sentry self-hosted are you using? If you are on an older version, it is possible that the sentry-cli login
command is not compatible with your self-hosted instance, since the URL for generating a token is different in the older version.
I use the most recent version: 24.4.1
Okay, thanks for confirming, @JeremiaAu.
I was able to reproduce this problem by running the Sentry development server locally, then running the login
command directed at the development server's URL, like so:
sentry-cli --url=http://localhost:8000 login
I suspect that this issue is caused by a problem in the Sentry backend, not the CLI, since the command works fine against Sentry SaaS. So, I am transferring this issue to the getsentry/sentry repository, so the team that maintains the Sentry backend can try to investigate this issue.
To whoever triages this issue in getsentry/sentry: please reach out to me if you determine that any changes are needed in the CLI.
Assigning to @getsentry/support for routing ⏲️
Just to be clear: the literal URL it is redirecting to is https://sentry.example.com/orgredirect/organizations/:orgslug/settings/auth-tokens/, or does it actually correctly sub in your org slug for :orgslug
?
Yes, that is the literal URL.
@szokeasaurusrex Since you have context here, do you have a recommendation on which team this issue should go to? This is a self-hosted specific issue but we don't work with this part of the codebase.
I think it would be easiest for the sentry-cli team to replace the current URL with the following one, since it has no orgslug: https://sentry.example.com/settings/account/api/auth-tokens/
@szokeasaurusrex What do you think about this?
Does any one have temporary solution for this ?
Does any one have temporary solution for this ?
You could just create the file by hand: https://docs.sentry.io/cli/configuration/#to-authenticate-manually
Environment
self-hosted Sentry
Windows Computer sentry-cli-Windows-x86_64.exe version 2.30.5
Steps to Reproduce
Using the command Line:
sentry-cli-Windows-x86_64.exe --url https://sentry.example.com/ login
This helps you signing in your sentry-cli with an authentication token. If you do not yet have a token ready we can bring up a browser for you to create a token now.
Sentry server: sentry.example.com Open browser now? [y/n] y
Expected Result
Relevant Settings Page pops up.
e.g.: https://sentry.example.com/settings/account/api/auth-tokens/ or: https://sentry.example.com/settings/[org-slug]/auth-tokens/
Actual Result
"Page Not Found" https://sentry.example.com/orgredirect/organizations/:orgslug/settings/auth-tokens/