-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RAILWAY_API_TOKEN is ignored when running railway link #575
Comments
Hello, Please make sure you are on the least version. |
Yes this applies to the latest version |
Just checked the latest version in a CI and the only way for me to get this is by messing up branch protection rules that affect the variable. Could you share more of your context? Like, are you having that issue in CI, what's your env setup is, etc.? |
Confirming that I get this as well. It's when you are logged out. I'm trying to build a CI pipeline in Github actions. Unfortunately nearly all of the CLI requires the project to be linked. You can't link without logging it, and settings RAILWAY_API_TOKEN or RAILWAY_TOKEN don't seem to matter. Regardless of using the CLI in Github, I can see the same problem in a Linux env locally. |
But why do you need to link a project? |
@maddsua Because the vast majority of the CLI requires me to link it to use it's functionality. As a very concrete example, I need to set an environment variable for a DB_URL on build. In my case I want to build a github action that deploys a new environment for each PR and that passes in a unique env var per build. This would let me run a full flow where I isolate each PR with it's own preview, it's own DB (not hosted by railway), and can then pass that deployed preview URL to my test framework. Vercel provides Without allowing the railway CLI to be logged in, or run equivalent commands in a CI pipeline it's sort of neutered vs. running it locally where I can login and link. Here's a full discussion on your discord about my usage. Ultimately, I went with Fly which seemed to support this stuff much better |
Running
railway link -p ...
after version3.14.0
always results in "Unauthorized. Please login withrailway login
" even whenRAILWAY_API_TOKEN
is setThe text was updated successfully, but these errors were encountered: