Git push gives "Failed to export folders to work folder"

I have an n8n instance running where I’ve set up a git branch in Settings/Environments. Push to git used to work fine, but now I get the error “Failed to export folders to work folder” every time I try.

I tried disconnecting Git and reconnecting to a new, empty branch but I still get the same error.

Debug info

core

  • n8nVersion: 1.98.1
  • platform: docker (self-hosted)
  • nodeJsVersion: 22.16.0
  • database: postgres
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)
  • consumerId: e144786d-d666-43f2-926e-51af6a63b0fc
1 Like

i think “Failed to export folders to work folder” in your n8n instance when pushing to Git is often related to file system permissions or issues with the configuration of your Git integration. try these:
Check File System Permissions
Ensure that the workFolder directory used by n8n for Git operations has the correct read/write permissions. If n8n is running in a Docker container: run docker exec -it <container_name> /bin/bash and then verify the permissions on the default location /home/node/.n8n. Ensure that the Git repository is initialized correctly and accessible and incdrease Debug Logging

The plot thickens: it actually did copy the selected workflows to /home/node/.n8n/git/workflows, but it never got as far as git add. Everything is owned by node so I don’t see how it could be permissions.

I’m getting the same issue. I think it’s a bug in the new version. I haven’t tried rolling back. When was your last update?

I’m getting almost the same issue, except the error message says “Failed to export variables to work folder” when I hit the push and commit button. Everything leading up to this looks like it is connecting to Github correctly.

We’re on 1.98.2 here. I tried looking at folders and projects in the DB to see if maybe it was in an inconsistent state, but everything looked great.

Please comment with your issues here!