Deno "PermissionDenied: Requires run access" in CI
Deno blocked a subprocess spawn because --allow-run was not granted. The message names the executable the program tried to launch.
What this error means
The run fails with "PermissionDenied: Requires run access to \"git\", run again with the --allow-run flag" when the program calls Deno.Command or Deno.run.
deno
error: Uncaught (in promise) PermissionDenied: Requires run access to "git", run again with the --allow-run flag
at Object.spawn (ext:deno_process/40_process.js:...)Common causes
No --allow-run in the CI command
The program shells out to a binary but the invocation grants no run permission, so the spawn is denied.
The binary is outside a scoped run grant
A scoped --allow-run=git does not cover a second executable the program also invokes.
How to fix it
Grant run access to the binaries you spawn
- Read the executable name Deno reports.
- Add
--allow-run=<binary>for each subprocess the program launches. - Confirm those binaries are on PATH in the runner.
Terminal
deno run --allow-run=git,node mod.tsPrefer scoped run over allow-all
List the exact executables rather than granting unrestricted subprocess access, especially in CI that handles secrets.
Terminal
deno run --allow-run=deno mod.tsHow to prevent it
- Scope
--allow-runto named executables, not blanket run access. - Ensure spawned binaries exist on the runner PATH.
- Keep run flags aligned with the subprocesses the program starts.
Related guides
Deno "PermissionDenied: Requires env access" in CIFix Deno "PermissionDenied: Requires env access to ... run again with the --allow-env flag" in CI - the progr…
Deno "PermissionDenied: Requires net access" in CIFix Deno "PermissionDenied: Requires net access to ... run again with the --allow-net flag" in CI - the progr…
Deno "PermissionDenied: Requires write access" in CIFix Deno "PermissionDenied: Requires write access to ... run again with the --allow-write flag" in CI - the p…