Fix git dubious ownership: chown ncdeploy + safe.directory

This commit is contained in:
dev
2026-08-22 15:25:49 +02:00
parent d1eeb855ed
commit 140ae38877
2 changed files with 76 additions and 4 deletions
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Snabbfix om git "dubious ownership" efter root-kloning
set -euo pipefail
DIR="${1:-/home/ncdeploy/nextcloud-collabora-nodered}"
USER="${2:-ncdeploy}"
echo "chown ${USER} ${DIR}"
chown -R "${USER}:${USER}" "${DIR}"
sudo -u "${USER}" git config --global --add safe.directory "${DIR}"
echo "Klart. Kör: cd ${DIR} && ./install.sh"