Skip to content

Commit 9cfcd5c

Browse files
authored
try to fix git fetch errors
fatal: unsafe repository ('/github/workspace' is owned by someone else)
1 parent cbbad9c commit 9cfcd5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ echo "${GIT_DEPLOY_KEY}" > /root/.ssh/id_rsa && \
88
chmod 400 /root/.ssh/id_rsa
99

1010
echo '=================== Sync with mirror git ==================='
11+
git config --global --add safe.directory /github/workspace
12+
1113
git version
1214
git fetch --unshallow origin
1315
git checkout master
@@ -20,4 +22,3 @@ git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
2022
echo 'ready to push'
2123
git push backup master -f
2224
git remote remove backup
23-

0 commit comments

Comments
 (0)