{"record":{"id":"0514512612c11c4d","repo":"hasura/graphql-engine","slug":"setting-up-codegen-assets-repo-failed-this-is-req-051451","errorCode":null,"errorMessage":"setting up codegen-assets repo failed (this is required for automatically generating actions code): %w","messagePattern":"setting up codegen-assets repo failed \\(this is required for automatically generating actions code\\): %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/commands/actions_use_codegen.go","lineNumber":51,"sourceCode":"  hasura actions use-codegen --framework nodejs-express\n\n  # Use codegen from framework list\n  hasura actions use-codegen\n\n  # Set output directory\n  hasura actions use-codegen --output-dir codegen\n\n  # Use a codegen with a starter kit\n  hasura actions use-codegen --with-starter-kit true`,\n\t\tSilenceUsage: true,\n\t\tPreRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\top := genOpName(cmd, \"PreRunE\")\n\n\t\t\terr := ec.SetupCodegenAssetsRepo()\n\t\t\tif err != nil {\n\t\t\t\treturn errors.E(\n\t\t\t\t\top,\n\t\t\t\t\tfmt.Errorf(\n\t\t\t\t\t\t\"setting up codegen-assets repo failed (this is required for automatically generating actions code): %w\",\n\t\t\t\t\t\terr,\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t}\n\n\t\t\terr = ec.SetupCodegenAssetsRepo()\n\t\t\tif err != nil {\n\t\t\t\treturn errors.E(op, \"setting up codengen assets repo failed\")\n\t\t\t}\n\t\t\t// ensure codegen-assets repo exists\n\t\t\terr = ec.CodegenAssetsRepo.EnsureCloned()\n\t\t\tif err != nil {\n\t\t\t\treturn errors.E(\n\t\t\t\t\top,\n\t\t\t\t\tfmt.Errorf(\n\t\t\t\t\t\t\"pulling latest actions codegen files from internet failed: %w\",\n\t\t\t\t\t\terr,","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/commands/actions_use_codegen.go#L33-L69","documentation":"Thrown from the PreRunE hook of `hasura actions use-codegen` when ec.SetupCodegenAssetsRepo() fails. Setup ensures the codegen-assets repository is cloned and up to date locally so framework templates and starter kits can be listed; any git/network/filesystem failure inside setup surfaces here.","triggerScenarios":"Running `hasura actions use-codegen` offline, without git on PATH, behind a proxy blocking github.com, or with an unwritable/corrupted CLI home directory where the repo is cloned.","commonSituations":"Restricted corporate networks, CI without egress to github.com, broken proxy config, or a corrupted earlier clone in the CLI home dir.","solutions":["Verify `git ls-remote https://github.com/hasura/codegen-assets` works from the same shell.","Install/fix git and ensure it is on PATH.","Configure proxy env (HTTPS_PROXY) or git http.proxy if behind a corporate proxy.","Remove the existing codegen-assets clone dir and retry for a clean clone."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"command -v git >/dev/null && git ls-remote https://github.com/hasura/codegen-assets.git >/dev/null 2>&1","typeGuard":null,"tryCatchPattern":"Catch, verify git/network, remove the stale clone, retry the command once.","preventionTips":["Pre-warm the clone in CI with a manual git clone step.","Cache the CLI home dir in CI caches."],"tags":["git","network","clone","hasura-cli","codegen"],"backgroundTag":"git-clone-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}