13 days ago
My github actions is essentially just copy pasted from the railwayapp/cli the only edit really is using the secrets for the service id:deploy-job: runs-on: ubuntu-latest container: [ghcr.io/railwayapp/cli:latest](ghcr.io/railwayapp/cli:latest) env: SVC_ID: ${{ secrets.RAILWAY_SERVICE_ID }} RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }} steps: - uses: actions/checkout@v3 - run: railway up --service=${{ env.SVC_ID }}
When I run the work flow it fails because of the error:Run railway up --service=*** railway up --service=*** shell: sh -e {0} env: SVC_ID: *** RAILWAY_TOKEN: *** Unauthorized. Please login withrailway login The RAILWAY_TOKEN environment variable is set but may be invalid or expired.
I have triple checked the RAILWAY_TOKEN
I have tried it with railway project token
I have tried it with railway account token
I have even tried to just make the github action manually create the environment and then use the cli to try to deploy
nothing works, same error every time. I just want to deploy using the cli. I can't be the only one having this issue.
Project ID: 79303174-dea0-448f-8003-8c6efadd5ed5
39 Replies
Same here but with gitlab CI/CD. Token is recreated, still same error: "The RAILWAY_TOKEN environment variable is set but may be invalid or expired."
13 days ago
Same issue here, just suddenly stopped working for me, and I refreshed the token and still got the same error
13 days ago
I'm having the same issue, on the hobby plan. I've also tried recreating my token. I'm deploying using the cli on forgejo (gitea) actions.
13 days ago
Same same, no fix found so far
13 days ago
...and same here too. I tried the CLI on my computer and that seemed to have issues - railway login returned 404. railway link told me a new version of the CLI was available so I upgraded to v4.11.2 and then railway login worked again.
I am running my GitHub action using ghcr.io/railwayapp/cli:latest - I wonder if this has an older version of the CLI and that's causing the issues?
Update: 4.11.2 was published to GHCR this morning: https://github.com/railwayapp/cli/actions/runs/19693091312
Update2: Running the action in ghcr.io/railwayapp/cli:4.11.2 did not fix it
Update3: Running it in cli:4.11.1 did not fix it either. So perhaps this is an issue on Railway's side with token authentication.
Update4: Same issue on my localhost - I did a railway logout then set up a project token then tried that from the CLI.
From the comments above this is happening on GitHub, GitLab, Forgejo and localhost, and my test suggests it is happening with 4.11.1 which was working fine yesterday in my GitHub actions. So this really does look like it is on Railway's side.
13 days ago
Yeah same thing happening to me also and its frustrating
13 days ago
me too. no ability to deploy new code
13 days ago
Same here!
f00xhunter
me too. no ability to deploy new code
13 days ago
I can still deploy OK from localhost if I do 'railway login' and authenticate thru the web. It seems to be just the token based auth that not working. Would that get you moving at least?
13 days ago
I'm able to deploy new code by doing railway login locally (authenticating using the browser).
$ railway -V
railway 4.6.1
13 days ago
Having same issue on Github Actions pipeline. I re-generated the token but didn't work.
```
Unauthorized. Please login with railway login
The RAILWAY_TOKEN environment variable is set but may be invalid or expired.
Error: Process completed with exit code 1.
```
13 days ago
yup, same here. Wasn't able to find a workaround. Literally cannot deploy and onboarded my company to railway yesterday. This is kinda shitty...
13 days ago
Same here, looks like there's an issue in the last version of the CLI.
V - 4.11.2
https://github.com/railwayapp/cli/pull/700
13 days ago
same problem
13 days ago
Yup, same problem here
13 days ago
same problem
I have the same issue i have debugged severally (running locally and on ci(github actions)) but i keep getting the error below when i use railway up
railway up --service=backend --environment=staging --detach
Unauthorized. Please login with `railway login`
The RAILWAY_TOKEN environment variable is set but may be invalid or expired.13 days ago
Same here
13 days ago
Same here!
13 days ago
Even if I use RAILWAY_API_TOKEN, I still encounter exceptions.
13 days ago
When will the problem be resolved?
13 days ago
Same problem here as well
adriancoll-stowlog
Same here, looks like there's an issue in the last version of the CLI. V - 4.11.2https://github.com/railwayapp/cli/pull/700
13 days ago
I tried rolling back to 4.10 and @brams-dev says it is broken for him on 4.6 so maybe not a CLI issue?
13 days ago
Hey! We're looking into this right now, apologies for the inconvenience
13 days ago
Hello!
We're acknowledging your issue and attaching a ticket to this thread.
We don't have an ETA for it, but, our engineering team will take a look and you will be updated as we update the ticket.
Please reply to this thread if you have any questions!
13 days ago
just for knowledge, the deploy works, just the report on github does not work (in my case)
13 days ago
Having the same issue with GitHub Actions using cli v4.11.1
Attachments
13 days ago
It has been more than 7h since this was initially reported. We cannot deploy anything. You really need to get moving.
13 days ago
✅ The ticket Access Issue Detected has been marked as completed.
13 days ago
✅ The ticket Authorization Issue Detected has been marked as completed.
13 days ago
Awesome to hear. Again, super sorry about this!
Going to mark this thread as resolved, thank you for the patience 🫡
Status changed to Solved ray-chen • 13 days ago




