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

  1. Check network access to github.com (e.g. `git ls-remote https://github.com/hasura/codegen-assets`) and fix proxy/DNS issues.
  2. Ensure git is installed and on PATH (`git --version`).
  3. Delete the partially cloned codegen-assets directory under the CLI config/home dir and rerun so it reclones cleanly.
  4. If behind a proxy, configure git's http.proxy (or HTTPS_PROXY) and retry.
  5. 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

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


AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28). Data as JSON: /api/errors/f4ae7f1fdcaecf88. Report an issue: GitHub.