Git Clone Permission Issue in new n8n

Describe the problem/error/question

What is the error message (if any)?

Access to the repository path is not allowed.

Please share your workflow

Share the output returned by the last node

Access to the repository path is not allowed
Node type
n8n-nodes-base.git
Node version
1 (Latest)
n8n version
2.1.0 (Self Hosted)
Time
12/16/2025, 10:50:49 PM
Stack trace
NodeOperationError: Access to the repository path is not allowed at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_8da18263ca0574b0db58d4fefd8173ce/node_modules/n8n-nodes-base/nodes/Git/Git.node.ts:293:12) at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1045:8) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1226:11) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1662:27 at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2274:11

Information on your n8n setup

  • n8n version: 2.1.0
  • Database (default: SQLite): Postgres 18
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: TrueNAS Community Edition (25.10.0.1 - Goldeye)
1 Like

This also happened to me after the 2.0 update

edit: reverted to 1.123.6 and it’s back to normal

1 Like

So we think this is a bug and not a feature, and a temporary rollback until the fix is implemented is the best solution for now?

1 Like

I guess you have to use /home/node/.n8n-files dir for that repo. It is a new restriction. By default, at least.

Too bad it is not that informative, because read files node speaks that path clearly.

~/.n8n/git/repoName
~/.n8n-files/git/repoName

is also not working. very disappointing major update…

/home/node/.n8n-files/git/repoName

is working, but only if you create the parent folder(s) manually. The mkdir command has also been removed from n8n in version 2.

Confirm that in version 2.0.3, this can be fixed by using /home/node/.n8n-files/git/repoName

I can’t get this to work using the methods described above. Is there any official documentation on how to use the git node in n8n 2.x? I’ve already invested hours in trying to get this to work.

Im using a self hosted n8n instance.

Found the error: my N8N_RESTRICT_FILE_ACCESS_TO content had quotes around it. Removing the quotes fixed the issue.