Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ jobs:
# Keep VM source scripts in sync with latest main before running any local script.
if [ -d .git ]; then
git config --global --add safe.directory "$DEPLOY_PATH" || true
sudo git config --system --add safe.directory "$DEPLOY_PATH" || true
Comment on lines +179 to +180
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using git config --global --add safe.directory (and especially sudo git config --system --add ...) on every deploy will keep appending duplicate safe.directory entries to ~/.gitconfig and /etc/gitconfig, and it permanently mutates host configuration. Prefer a non-persistent approach (e.g., run the fetch/checkout/pull with git -c safe.directory="$DEPLOY_PATH" ...), or at least use --replace-all / guard so the value is only set once. Also consider dropping the --system write unless there’s a confirmed need to modify /etc/gitconfig.

Copilot uses AI. Check for mistakes.
git fetch origin
git checkout main
git pull --ff-only origin main
Expand Down
Loading