https://prefect.io logo
Title
y

Yaron Levi

09/09/2022, 4:08 AM
Hi 👋 I am trying to use the GitHub repo feature that was added in 2.3.0 I have this code for creating the deployment (🔥*which doesn’t work*🔥):
from weekly_bonus_calc import weekly_bonus_calc
from prefect.deployments import Deployment
from prefect.filesystems import GitHub

storage = GitHub(
    repository="<https://github.com/yuvital/yuvital-prefect-github.git>"
)

deployment = Deployment.build_from_flow(
    flow=weekly_bonus_calc,
    name="weekly-bonus-calc",    
    work_queue_name="work-queue",
    storage=storage,
    schedule={'cron': '*/5 * * * *', 'timezone': "Asia/Jerusalem"}
)

deployment.apply()
Also, I’ve created a GitHub block via the UI (attaching a screenshot). Can you point out the correct way to setup this. Another thing I don’t understand is where are the Git credentials should go since this is obviously a private repo. Thank you for any help on the issue 🙏
1
j

Jeff Hale

09/09/2022, 12:51 PM
Support for private repos should be coming soon. You can track the issue (and see a workaround that isn’t ideal) here.