mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2026-01-04 20:19:37 -06:00
fix: Add git safe.directory configuration for update commands
- Add 'git config --global --add safe.directory' before git pull in update_instance - Add same fix to small management script update command - Resolves 'dubious ownership' error when updating repositories that were cloned as root but accessed by different users This fixes the git ownership security warning that prevents git pull from working during updates.
This commit is contained in:
@@ -1144,6 +1144,7 @@ case \$1 in
|
||||
;;
|
||||
"update")
|
||||
cd $APP_DIR
|
||||
git config --global --add safe.directory $APP_DIR 2>/dev/null || true
|
||||
git pull
|
||||
npm install
|
||||
cd backend && npm install
|
||||
@@ -1364,6 +1365,10 @@ update_instance() {
|
||||
|
||||
# Update code
|
||||
print_info "Pulling latest code..."
|
||||
|
||||
# Fix git ownership issue if it exists
|
||||
git config --global --add safe.directory "$app_dir" 2>/dev/null || true
|
||||
|
||||
git pull
|
||||
|
||||
# Update dependencies
|
||||
|
||||
Reference in New Issue
Block a user