Skip to content

Commit

Permalink
Fix `fatal: unsafe repository ('/github/workspace' is owned by someon… (
Browse files Browse the repository at this point in the history
#19)

* Fix `fatal: unsafe repository ('/github/workspace' is owned by someone else)`

Looks like there were some changes to git, and this action currently errors out.

```
fatal: unsafe repository ('/github/workspace' is owned by someone else)
```

The fix is to add a safe directory (tested in a separate repo).

Related Stack Overflow: https://stackoverflow.com/questions/71849415/cannot-add-parent-directory-to-safe-directory-on-git

* Update entrypoint.sh
  • Loading branch information
tokestermw authored Apr 13, 2022
1 parent f312a19 commit b7c32da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e

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

git fetch --tags
# This suppress an error occurred when the repository is a complete one.
git fetch --prune --unshallow || true
Expand Down

0 comments on commit b7c32da

Please sign in to comment.