Azure / Azure/static-web-apps

Azure Static Web Apps Deploy Fails with "Dubious Ownership" Error (Hugo Site)

Open
#1,418 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Description:**

I'm encountering a deployment issue when attempting to push my [Hugo](https://gohugo.io/) site to Azure Static Web Apps. While deployments to GitHub Pages work successfully (workflow: [link to successful workflow](https://github.com/colin-gourlay/sundown-sessions/actions/runs/7943023327)), deployments to Azure fail with the following error:

```
ERROR 2024/02/17 16:49:12 Failed to read Git log: 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
```
**Observations:**

This issue also appears to be affecting others, - see #1271

My setup differs slightly, but the observed behavior aligns with the identified problem.

**Additional Information:**

Link to failing Azure Static Web Apps deployment workflow: [link to failed workflow](https://github.com/colin-gourlay/sundown-sessions/actions/runs/7943023325)

**Request:**

Any feedack or suggestions on how to resolve this deployment error would be greatly appreciated.
If this issue has already been addressed, please share the related solution or discussion.

**Additional Info:**

Repo can be found here: [sundown-sessions](https://github.com/colin-gourlay/sundown-sessions)
YAML can be found here: [Azure Static Web Apps CI/CD](https://github.com/colin-gourlay/sundown-sessions/blob/main/.github/workflows/azure-static-web-apps-proud-tree-0c62dd303.yml)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.