From b7c32daec3395a9616f88548363a42652b22d435 Mon Sep 17 00:00:00 2001 From: Motoki Wu Date: Wed, 13 Apr 2022 06:22:32 -0700 Subject: [PATCH] =?UTF-8?q?Fix=20`fatal:=20unsafe=20repository=20('/github?= =?UTF-8?q?/workspace'=20is=20owned=20by=20someon=E2=80=A6=20(#19)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 9f8657e..d139660 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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