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.
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 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.