Error: spawn git EACCES at Process.ChildProcess._handle.onexit

Describe the problem/error/question

Post version update to 2.0.0 a bunch of my workflow broke, kind of expected but this one I just can’t figure out a way to fix.
I have a webhook which looks up files in a git repo and respond with the content, meaning that I have a git clone / git pull node, and then a file read. I practice I explicitly set to file access to the default location ( as far as I know )

$ cat docker-compose.yml | yq .services.server.environment.N8N_RESTRICT_FILE_ACCESS_TO
“/home/node/.n8n-files”

I also create a blind mount

$ cat docker-compose.yml | yq .services.server.volumes[1]
“./n8n-files:/home/node/.n8n-files”

With correct permissions, and ownership.

$ ls -aln . | grep n8n-files
drwxrwxr-x 5 1000 1000 5 Dec 14 16:05 n8n-files

However when I invoke the workflow, I get the error:

Problem in node ‘Pull‘
Error: spawn git EACCES at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19) at onErrorNT (node:internal/child_process:483:16) at processTicksAndRejections (node:internal/process/task_queues:90:21)

What is the error message (if any)?

See above

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

{
“nodes”: [
{
“parameters”: {
“authentication”: “gitPassword”,
“operation”: “clone”,
“repositoryPath”: “/home/node/.n8n-files/<my_repo>”,
“sourceRepository”: “https://<my_git_server>/<my_user>/<my_repo>”
},
“type”: “n8n-nodes-base.git”,
“typeVersion”: 1,
“position”: [
224,
-224
],
“id”: “abcdef01-2345-6789-0abc-def012345678”,
“name”: “Git”,
“alwaysOutputData”: false,
“credentials”: {
“gitPassword”: {
“id”: “2029”,
“name”: “<uniq_name> n8n-bot”
}
},
“onError”: “continueErrorOutput”
}
],
“connections”: {
“Git”: {
“main”: [
,

]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “dc09a57def958482a6f655ae99b38636865e650e02c18374ef6475e57e109d9d”
}
}

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 2.0.0
  • Database (default: SQLite): sqlite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):docker
  • Operating system: NA

The EACCES error typically indicates a permissions issue with the git binary in your Docker container. Since you’re using the Git node, you’ll need to ensure:

1. Git is properly installed in your container (try running `apt-get update && apt-get install -y git` in your container)

2. The node user (UID 1000) has execute permissions on the git binary

3. Your volume mount has the correct permissions (which your ls output shows is correct)

Try adding git to your container first, as this is often the root cause of spawn errors. The error suggests the system can’t find/execute the git command.

As of now I rolled back to 1.x as there are way more errors with 2.x around code running, so I put a pin into this for now.