<Private repo >(shows with prefect.yaml) cc: <@U07...
# pacc-june-20-21-2024
j
Private repo (shows with prefect.yaml) cc: @Juan Camilo Puello Paternina - see .deploy with Secrete block in the ๐Ÿงต
gratitude thank you 1
With .deploy, scroll down on this page a bit: With a secret block for a private repo:
Copy code
from prefect import flow
from prefect.runner.storage import GitRepository
from prefect.blocks.system import Secret

if __name__ == "__main__":
    flow.from_source(
        source=GitRepository(
        url="<https://github.com/org/private-repo.git>",
        branch="dev",
        credentials={
            "access_token": Secret.load("github-access-token")
        }
    ),
    entrypoint="flows/no-image.py:hello_world",
    ).deploy(
        name="private-git-storage-deployment",
        work_pool_name="my_pool",
        build=False
    )
๐Ÿ‘€ 1