diff --git a/pkg/recipe/recipe.go b/pkg/recipe/recipe.go index 3591724c..486973b8 100644 --- a/pkg/recipe/recipe.go +++ b/pkg/recipe/recipe.go @@ -70,7 +70,15 @@ func EnsureExists(recipe string) error { url := fmt.Sprintf("%s/%s.git", config.REPOS_BASE_URL, recipe) _, err := git.PlainClone(recipeDir, false, &git.CloneOptions{URL: url, Tags: git.AllTags}) if err != nil { - return err + // try with main branch because Git is being a Git + _, err := git.PlainClone(recipeDir, false, &git.CloneOptions{ + URL: url, + Tags: git.AllTags, + ReferenceName: plumbing.ReferenceName("refs/heads/main"), + }) + if err != nil { + return err + } } }