Hi every body !!! Let me share with you all an iss...
# ask-community
a
Hi every body !!! Let me share with you all an issue I have: First that is my code
a
if you have a secret named GITHUB_ACCESS_TOKEN, then you can just reference this secret by name in the GitHub storage, like so:
Copy code
STORAGE = GitHub(
    repo="anna-geller/packaging-prefect-flows",
    path=f"flows/{FLOW_NAME}.py",
    access_token_secret="GITHUB_ACCESS_TOKEN",  # required with private repositories
)
the PrefectSecret is a task, therefore it should only be used within a Flow constructor:
Copy code
with Flow("yourflow") as flow:
    some_secret = PrefectSecret("SOME_SECRET")
a
if PrefectSecret are a task …
I have to hard code the api key ?
so the secret will have on github not in prefect. ?
will be on *
a
nothing is hardcoded, the “GITHUB_ACCESS_TOKEN” is only the name of your Secret. Prefect will retrieve it for you from the backend. You only need to change this one line and you should be good to go
a
but I am not sure where I have to save the secret, on github or prefect …
by the way the prefect web is not running now :-s maybe I broken something ?
i think is working …
only
ImportError: Unable to import Github, please ensure you have installed the github extra
but I more closer to the success
Copy code
pip install 'prefect[github]'
what I am doing wrong ? now the erro are
is working !!! thanks so much
👍 1