Railway Link does not work with Project Token
poorshad-shaddel_redbull
PROOP

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


poorshad-shaddel_redbull
PROOP

2 months ago

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


poorshad-shaddel_redbull
PROOP

2 months ago

Railway Link does not work with Project Token


A project token is already linked to that specific project.
I doubt railway link would work in this case.


passos
MODERATOR

2 months ago

There's no such thing of project token being already linked afaik.


passos
MODERATOR

2 months ago

First of all, what Railway version are you on? railway --verson


passos
MODERATOR

2 months ago

Make sure that you're on the latest on


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…


passos
MODERATOR

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"


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 😅 )


passos
MODERATOR

2 months ago

Yeah never mind, I understood it wrong anyway


Loading...