fix(deploy.sh): git safe.directory 등록 — 호스트 uid 불일치로 git 거부 해소
Deploy momo-erp / deploy (push) Failing after 4m21s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
chpark
2026-05-30 15:27:37 +09:00
parent 83478fd3e1
commit 63d83b5004
+5
View File
@@ -6,6 +6,11 @@
set -e
cd /deploy/source 2>/dev/null || cd "$HOME/momo-erp/source"
# 컨테이너 안에서 webhook 가 호출 시: 호스트 chpark(1000) 소유 디렉토리를
# nextjs(1001) 가 git 명령으로 다룸 → git 의 "dubious ownership" 거부 회피
git config --global --add safe.directory "$(pwd)" 2>/dev/null || true
git config --global --add safe.directory '*' 2>/dev/null || true
echo "[$(date)] git fetch + reset --hard origin/main"
git fetch origin
git reset --hard origin/main