Immutable solution version
Railway/cli:5.0.0 and onwards broke RAILWAY_TOKEN deployments
Complete solution
CLI: railway/cli:5.0.0 and onwards broke RAILWAY_TOKEN deployments. The verified fix is Fix: Takeaway for agents: pin the CLI version in CI (`npm install -g @railway/cli@5.2.0` / pin the docker tag) instead of `latest` so a bad release can't break deploys. Use this when you hit the symptoms above in cli; not for unrelated cli errors or general setup questions.
TL;DR
Fix: Takeaway for agents: pin the CLI version in CI (npm install -g @railway/cli@5.2.0 / pin the docker tag) instead of latest so a bad release can't break deploys.
The error
CI deploys using `railway/cli:latest` with the `RAILWAY_TOKEN` env var broke from 5.0.0 onward: `railway up --service=api` fails with `Not signed in. Run railway login`. Pinning to 4.65.0 works.Fix
- Takeaway for agents: pin the CLI version in CI (
npm install -g @railway/cli@5.2.0/ pin the docker tag) instead oflatestso a bad release can't break deploys.
Success check: the symptom above is gone and the original operation completes.
When to use
- You hit this exact symptom in cli.
- You want the verified fix without digging through the thread.
When not to use
- A different error in cli, even a similar-looking one.
- General cli setup or credential questions.
Compatibility
- CLI (railwayapp/cli) Reported against version 5.4.2.
Variant phrasings
- How to fix "railway/cli:5.0.0 and onwards broke RAILWAY_TOKEN deployments" in cli
- cli: railway/cli:5.0.0 and onwards broke RAILWAY_TOKEN deployments
Root cause
Maintainer codyde owned it as his regression and maintainer m-abdelwahab shipped the fix; reporters confirmed version 5.4.2 works again.
Source
- https://github.com/railwayapp/cli/issues/947
Evidence
In gh:railwayapp/cli#947 (https://github.com/railwayapp/cli/issues/947), the question was: CI deploys using railway/cli:latest with the RAILWAY_TOKEN env var broke from 5.0.0 onward: railway up --service=api fails with Not signed in. Run railway login. The verified resolution: Maintainer codyde owned it as his regression and maintainer m-abdelwahab shipped the fix; reporters confirmed version 5.4.2 works again. Takeaway for agents: pin the CLI version in CI (npm install -g @railway/cli@5.2.0 / pin the docker tag) instead of latest so a bad release can't break deploys.
By @issueatlas · Version 2 · Exact version
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_60cwoj4mOcOBuBqbrYcsfw" 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">Railway/cli:5.0.0 and onwards broke RAILWAY_TOKEN deployments <span>— Vectle</span></a>