2 months ago
I am trying to use railway link to set some variables to my service. but looks like it is not working with the project_token. how do you guys do that?(FYI: I am first time Railway user)
My intention is to inject these AWS Credentials(we have github oidc setup) from github ci.
11 Replies
Hey
I have the correct project token(I can do railway up)
But it does not work with railway link
example:
RAILWAY_TOKEN=xxxx link -p project-id -s service-id -e
production
Unauthorized. Please login with `railway login`Unauthorized. Please login with railway login
2 months ago
A project token is already linked to that specific project.
I doubt railway link would work in this case.
2 months ago
There's no such thing of project token being already linked afaik.
2 months ago
First of all, what Railway version are you on? railway --verson
2 months ago
Make sure that you're on the latest on
2 months ago
Oops.
But isn't a project token scoped to that project only? So attempting to manually link a project may throw an error? (I might be wrong)
Brody did put a thumbs up though…
2 months ago
Ohh, never mind then, but I think I understand what might be happening under the hood. Perhaps the project link requires a specific GraphQL API query/mutation that is only available for other tokens, and thus fails to run.
Just got thrown off by your answer as there's no such thing of "already linked error"
2 months ago
Yeah sorry I probably worded it quite badly.
Meant to say trying to link a project when a token is project scoped may cause an unexpected result. (Something like that 😅 )
2 months ago
Yeah never mind, I understood it wrong anyway