Railway CLI login all methods failing
gdeankrotos
TRIALOP

a year ago

I have been unable to login via the CLI using railway login using any of the methods described in the docs. Browser, --browserless and RAILWAY_TOKEN environment variable.

In all cases, the login fails and returns "Unauthorized. Please login with railway login"

When I try using the browser, I see a "Success" message, but the CLI responds with "Unauthorised"

Is this to do with my account being a Trial account or is there a wider issue? I can't get it working at all.

4 Replies

gdeankrotos
TRIALOP

a year ago

850535f4-1035-4f51-9930-3c01125155b1


antonioc-cl
PRO

a year ago

I have had the same issue before. Try logging out your cli and try again. If it does not work, maybe try to restart the terminal and logout of railway as well. Then try to login via terminal, that will prompt the browser login as well.


hbar1st
FREE

6 months ago

I have the same issue, but it only happens when I'm in a wsl2 environment. If I try direct from windows powershell, it works. Unfortunately that doesn't help me since I need to run Node.js code in wsl2.


khyarih
HOBBY

6 months ago

had the same issue, the solution was to run it using sudo, if you are using sudo npm install.... to install the CLI, running sudo railway login could help solving the issue


Loading...