hasura/graphql-engine · error
pulling latest actions codegen files from internet failed: %
Error message
pulling latest actions codegen files from internet failed: %w
What it means
Thrown by the Hasura CLI actions codegen command when it cannot clone or update the codegen-assets repository (github.com/hasura/codegen-assets), which holds the framework codegen templates. The wrapper calls ec.CodegenAssetsRepo.EnsureCloned(), which performs a git clone/pull of that repo into the CLI's home directory. Any git/network/permissions failure inside EnsureCloned is surfaced with this message.
Source
Thrown at cli/commands/actions_codegen.go:57
PreRunE: func(cmd *cobra.Command, args []string) error {
op := genOpName(cmd, "PreRunE")
err := ec.SetupCodegenAssetsRepo()
if err != nil {
return errors.E(
op,
fmt.Errorf(
"setting up codegen-assets repo failed (this is required for automatically generating actions code): %w",
err,
),
)
}
// ensure codegen-assets repo exists
err = ec.CodegenAssetsRepo.EnsureCloned()
if err != nil {
return errors.E(
op,
fmt.Errorf(
"pulling latest actions codegen files from internet failed: %w",
err,
),
)
}
return nil
},
RunE: func(cmd *cobra.Command, args []string) error {
op := genOpName(cmd, "RunE")
opts.actions = args
err := opts.run()
if err != nil {
return errors.E(op, err)
}
View on GitHub (pinned to 724551b9ae)
Solutions
- Check network access to github.com (e.g. `git ls-remote https://github.com/hasura/codegen-assets`) and fix proxy/DNS issues.
- Ensure git is installed and on PATH (`git --version`).
- Delete the partially cloned codegen-assets directory under the CLI config/home dir and rerun so it reclones cleanly.
- If behind a proxy, configure git's http.proxy (or HTTPS_PROXY) and retry.
- As a workaround, manually clone the codegen-assets repo into the location the CLI expects.
Defensive patterns
Strategy: retry
Validate before calling
exec.Command("git", "ls-remote", "https://github.com/hasura/codegen-assets.git").Run() // exit 0 => clone should succeed Try / catch
Wrap the CLI invocation; on error containing 'pulling latest actions codegen files', check network/proxy, remove the local clone dir, and retry once.
Prevention
- Pre-clone the codegen-assets repo in CI before running actions commands.
- Cache the clone directory between CI runs.
- Configure proxy env vars for git.
When it happens
Trigger: Running `hasura actions codegen` (or any command whose PreRunE ensures the codegen-assets repo) while offline, behind a proxy that blocks github.com, when git is not installed or not on PATH, or when ~/.hasura/codegen-assets (or the equivalent clone dir) is corrupted or not writable.
Common situations: Corporate networks with TLS-intercepting proxies, CI runners without network egress to github.com, read-only home directories, or a leftover half-cloned repo after an interrupted earlier run.
Related errors
- setting up codegen-assets repo failed (this is required for
- pulling latest actions codegen files from internet failed: %
- unable to fetch introspection schema: %w
- error getting actions file content: %w
- error generating codegen for action %s: %w
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/f4ae7f1fdcaecf88.
Report an issue: GitHub.