I’m trying to test with a PAT I generated today, setting
GITHUB_ACCESS_TOKEN
in the Context part of the UI when I run the flow
brian
12/01/2021, 11:05 PM
However, I still get a 401 from github
k
Kevin Kho
12/01/2021, 11:06 PM
Are you on Prefect Server or Cloud?
b
brian
12/01/2021, 11:07 PM
prefect cloud
k
Kevin Kho
12/01/2021, 11:08 PM
So you should store the secret on Prefect cloud, and then in the
access_token_secret
, provide the Secret name.
Copy code
access_token_secret="GITHUB_ACCESS_TOKEN"
Prefect will then fetch it on the execution side for you
b
brian
12/01/2021, 11:19 PM
gotcha
brian
12/01/2021, 11:20 PM
If I’d like to avoid adding a
GITHUB_ACCESS_TOKEN
to the secrets, say I add a
GITHUB_ACCESS_TOKEN_BRIANSORAHAN
with my PAT, how do I use this in a run I start via the UI?
k
Kevin Kho
12/01/2021, 11:21 PM
You would need to add that in the flow so it knows what secret to use to pull it down and register. The alternative is putting that env variable on the agent and using a local secret if you don’t want it stored on prefect cloud
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.