Skip to content

Commit

Permalink
try to fix git fetch errors
Browse files Browse the repository at this point in the history
fatal: unsafe repository ('/github/workspace' is owned by someone else)
  • Loading branch information
LinuxSuRen authored May 31, 2022
1 parent cbbad9c commit 9cfcd5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ echo "${GIT_DEPLOY_KEY}" > /root/.ssh/id_rsa && \
chmod 400 /root/.ssh/id_rsa

echo '=================== Sync with mirror git ==================='
git config --global --add safe.directory /github/workspace

git version
git fetch --unshallow origin
git checkout master
Expand All @@ -20,4 +22,3 @@ git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
echo 'ready to push'
git push backup master -f
git remote remove backup

0 comments on commit 9cfcd5c

Please sign in to comment.