Skip to content
Latchkey

Exit Code 126 in CI: What It Means and How to Fix It

Exit code 126 means the command exists but could not be executed - usually a permissions or interpreter problem.

The shell found the command but could not run it.

What it means

Found-but-not-executable: missing execute permission, wrong architecture, or a broken shebang.

Common causes

  • The script lacks +x permission.
  • A broken or missing interpreter on the shebang line.
  • Wrong-architecture binary.

How to fix it

Run chmod +x script, verify the shebang points to an installed interpreter, and confirm the binary matches the runner architecture.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →