r

    Ruslan

    1 year ago
    Hi! Where can I find examples how to use private github wtorage in prefect? I can-t understand how to use secrets. Seems like it doesn’t pass. Public repos work, but private no
    flow.storage = GitHub(secrets=["github"],
                          repo="corp/etl",
                          path="flows/flow.py")
    and error:
    Repo 'corp/etl' not found. Check that it exists (and is spelled correctly), and that you have configured the proper credentials for accessing it.
    when I try to use param as in docs memtion i get error
    TypeError: __init__() got an unexpected keyword argument 'access_token_secret'
    Kevin Kho

    Kevin Kho

    1 year ago
    Hi @Ruslan, are you on Cloud or Server?
    But it should be
    flow.storage = GitHub(repo="my_org/repo_name",
                          path="prefect_flows/flows/flow.py",
                          ref="trunk",
                        access_token_secret="GITHUB_ACCESS_TOKEN",)
    Where
    GITHUB_ACCESS_TOKEN
    is a secret that contains the access token
    r

    Ruslan

    1 year ago
    As i mentioned your code style return this error while registering flow
    TypeError: __init__() got an unexpected keyword argument 'access_token_secret'
    You may try to use this code and get same error. No matter cloud or server you are, this code is not acceptable. does anybody have working code example?
    Kevin Kho

    Kevin Kho

    1 year ago
    The example I have is from a working example. What Prefect version are you on?
    r

    Ruslan

    1 year ago
    aahh let me try to upgrade
    Kevin Kho

    Kevin Kho

    1 year ago
    The Secret name seems to have been added in 0.14.7
    r

    Ruslan

    1 year ago
    that helped thank you Kevin! version was 0.14.5!
    Kevin Kho

    Kevin Kho

    1 year ago
    Ah I see. Glad it’s working now 👍
    r

    Ruslan

    1 year ago
    in what path prefect begin to work after downloading flow? I put folder “replicator” with my code in /root/.prefect , after that “from replicator import organizer” in flow, but get error
    Failed to load and execute Flow's environment: ModuleNotFoundError("No module named 'replicator'",)
    Kevin Kho

    Kevin Kho

    1 year ago
    If you are using a LocalAgent, I believe it’s the path that you start it from. You and see this thread. They have an update on the end how they got it working
    r

    Ruslan

    1 year ago
    I believe it’s the path that you start it from.
    exactly thank you Kevin!!