chore: use git credential store (no token in remote URL)

Made-with: Cursor
This commit is contained in:
2026-04-24 08:25:48 +00:00
parent b525085e2b
commit 45ec147472
+4 -5
View File
@@ -4,12 +4,11 @@ REPO="$(cd "$(dirname "$0")/.." && pwd)"
MSG="${1:-Update nginx srv1361159.hstgr.cloud}"
cp -a /etc/nginx/sites-available/srv1361159.hstgr.cloud "$REPO/nginx/srv1361159.hstgr.cloud"
cd "$REPO"
git add nginx/srv1361159.hstgr.cloud README.md scripts 2>/dev/null || git add nginx/srv1361159.hstgr.cloud
if git diff --cached --quiet 2>/dev/null; then
git add nginx/srv1361159.hstgr.cloud
if git diff --cached --quiet; then
echo "No changes to commit."
exit 0
fi
git commit -m "$MSG" || true
TOKEN="$(cat /root/.config/gitea-justice.token)"
git push "https://giteaadmin:${TOKEN}@git.srv1361159.hstgr.cloud/giteaadmin/justice.git" main
git commit -m "$MSG"
git push origin main
echo "OK: committed and pushed."