Skip to content

Commit d517b20

Browse files
stevemidgleyclaude
andcommitted
Fix git safe.directory issue in deploy-app workflow
The repository is owned by root but ec2-user runs the deploy. Adding safe.directory config before git operations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent fc0f649 commit d517b20

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/deploy-app.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ jobs:
4747
set -e
4848
cd ${{ env.APP_DIR }}
4949
50+
# Fix git safe directory issue (repo owned by root, running as ec2-user)
51+
git config --global --add safe.directory ${{ env.APP_DIR }}
52+
5053
echo "Pulling latest code..."
5154
git fetch origin main
5255
git reset --hard origin/main

0 commit comments

Comments
 (0)