shalzz / zola-deploy-action

Github action for building a Zola site and deploying to Github Pages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fatal error when trying to fetch theme submodules

Wtoll opened this issue · comments

Relevant Versions

zola-deploy-action version 0.16.1
checkout version 3.3.0

Problem

I keep experiencing the following issue while using the action:

fatal: detected dubious ownership in repository at '/github/workspace'
To add an exception for this directory, call:

	git config --global --add safe.directory /github/workspace

I've traced it to the call in entrypoint.sh to fetch submodule themes.

Looking further it's weird because within checkout there is an option to add the repository directory as a safe directory which is by default set to true, but then somewhere in the process of the action being moved into the docker container the directories change (I've only a basic understanding of how actions work) and thus the permissions get reset.

It's my theory that a fix is as simple as adding a line calling git config --global --add safe.directory /github/workspace before the chunk to update the submodules but again I've not much experience making actions so I'm uncertain.