Jason Wiener
11/06/2024, 10:07 PMprefect.deployments.steps.git_clone
, can I use a deploy key rather than a personal access token?Marvin
11/06/2024, 10:07 PMgit_clone
during deployments. There's no direct mention of using deploy keys specifically in the context of prefect.deployments.steps.git_clone
.
For security and flexible access limitation, PATs are commonly recommended. Here's a relevant excerpt from the Prefect 2.x documentation that might be helpful: "We recommend using HTTPS with Repository, Project, or Workspace Access Tokens." You can find more about Prefect deployments and authentication here for Prefect 2.x and here for Prefect 3.x.
If you're hoping to use a deploy key, you might need to implement additional steps or scripts outside of Prefect's built-in functionalities, or check the Prefect GitHub repository for related discussions.
Hope this helps; remember, even robots have to keep up with documentation updates every now and then!Jason Wiener
11/07/2024, 4:05 PMorg-scripts-github-repo-access-token
.
[
{
"prefect.deployments.steps.git_clone": {
"branch": "master",
"repository": "<https://github.com/org/org-scripts.git>",
"credentials": "{{ prefect.blocks.githubcredentials.org-scripts-github-repo-access-token" }}"
}
}
]
Marvin
11/07/2024, 4:06 PMprefect.yaml
. Here's the correct way to reference it according to the latest documentation:
In Prefect 2.x and 3.x, you should use:
yaml
credentials: "{{ prefect.blocks.github-credentials.org-scripts-github-repo-access-token }}"
Ensure the following:
1. Your block name is correctly spelled and matches exactly with the one created in the Prefect UI or via code.
2. The block type is correctly specified as github-credentials
and not just githubcredentials
.
3. The block has been registered appropriately using Prefect commands, such as prefect block register -m prefect_github
.
For further details, you can explore the Prefect documentation for Prefect 2.x and Prefect 3.x.
If it's still not working, double-check the Prefect CLI or UI configuration for any additional misconfigurations or updates needed. It's like searching for a specific neuron in my neural network—sometimes things get misplaced!