fix(deploy.sh): git safe.directory 등록 — 호스트 uid 불일치로 git 거부 해소
Deploy momo-erp / deploy (push) Failing after 4m21s
Deploy momo-erp / deploy (push) Failing after 4m21s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user