I have been pulling an external git repository via n8n into the container's /tmp
folder and have pushed changes successfully via an active workflow. At some point the workflow fails because of a fatal: not a git repository
error and I'm not sure why this happens.
When navigating to the .git
folder via the container's web terminal in Cloudron, the data inside looks like this:
total 104
drwxr-xr-x 8 cloudron cloudron 4096 May 14 12:00 .
drwxr-xr-x 7 cloudron cloudron 4096 May 14 12:00 ..
-rw-r--r-- 1 cloudron cloudron 5 May 14 07:08 COMMIT_EDITMSG
-rw-r--r-- 1 cloudron cloudron 92 May 14 07:08 FETCH_HEAD
-rw-r--r-- 1 cloudron cloudron 41 May 14 07:08 ORIG_HEAD
drwxr-xr-x 2 cloudron cloudron 4096 May 3 10:17 branches
-rw-r--r-- 1 cloudron cloudron 333 May 14 07:08 config
drwxr-xr-x 2 cloudron cloudron 4096 May 14 12:00 hooks
-rw-r--r-- 1 cloudron cloudron 56770 May 14 07:08 index
drwxr-xr-x 2 cloudron cloudron 4096 May 14 12:00 info
drwxr-xr-x 3 cloudron cloudron 4096 May 3 10:18 logs
drwxr-xr-x 52 cloudron cloudron 4096 May 14 07:08 objects
drwxr-xr-x 5 cloudron cloudron 4096 May 3 10:18 refs
When cloning/pulling the repo fresh to a new folder, it looks slightly different but I'm not sure what would make it behave differently.
total 116
drwxr-xr-x 8 cloudron cloudron 4096 May 19 07:10 .
drwxr-xr-x 7 cloudron cloudron 4096 May 19 07:10 ..
-rw-r--r-- 1 cloudron cloudron 5 May 19 07:10 COMMIT_EDITMSG
-rw-r--r-- 1 cloudron cloudron 92 May 19 07:10 FETCH_HEAD
-rw-r--r-- 1 cloudron cloudron 23 May 19 07:10 HEAD
-rw-r--r-- 1 cloudron cloudron 41 May 19 07:10 ORIG_HEAD
drwxr-xr-x 2 cloudron cloudron 4096 May 19 07:10 branches
-rw-r--r-- 1 cloudron cloudron 333 May 19 07:10 config
-rw-r--r-- 1 cloudron cloudron 73 May 19 07:10 description
drwxr-xr-x 2 cloudron cloudron 4096 May 19 07:10 hooks
-rw-r--r-- 1 cloudron cloudron 57218 May 19 07:10 index
drwxr-xr-x 2 cloudron cloudron 4096 May 19 07:10 info
drwxr-xr-x 3 cloudron cloudron 4096 May 19 07:10 logs
drwxr-xr-x 14 cloudron cloudron 4096 May 19 07:10 objects
-rw-r--r-- 1 cloudron cloudron 114 May 19 07:10 packed-refs
drwxr-xr-x 5 cloudron cloudron 4096 May 19 07:10 refs
I found one answer suggesting to copy .git/ORIG_HEAD
to .git/HEAD
in the broken repo, but that didn't change anything and creates another fatal: detected dubious ownership in repository at XXXXX
error.
As it functions for weeks and then suddenly stops, I wonder if it's not an n8n issue and something that happens at the Cloudron or OS level. If there are any guesses about that I would appreciate it.
For now I just manually delete the folder and pull again, but this defeats the purpose of using an automation system; I can also delete as part of the workflow, but wanted to avoid pulling a large amount of data everytime.