Hi @BGBSAV ,
Are you the owner of the directory? the error you're getting is usually caused by a discrepancy between a user running the Git command and the owner of the directory where the repository is located.
Based on your pipeline configuration, it looks like you already added a PRE_BUILD_COMMAND
to set a safe.directory
in Git’s global configuration:
env:
PRE_BUILD_COMMAND: git config --global --add safe.directory /github/workspace
However, the error message suggests that Git is detecting incorrect ownership at /working_dir
. I suggest trying the following:
- move the
PRE_BUILD_COMMAND
env variable to run before the Azure static web app deployment task. - adjust your
PRE_BUILD_COMMAND
to add/working_dir
This command tells Git to skip the ownership check for/working_dir
, which should resolve the issue.
env:
PRE_BUILD_COMMAND: git config --global --add safe.directory /working_dir
Please let us know if you have further questions.
-Grace