This commit is contained in:
thomas 2025-07-01 17:43:49 +02:00
parent ba629a1443
commit 0addd4b570
1 changed files with 2 additions and 11 deletions

View File

@ -44,7 +44,7 @@ if [ ! -d .git ]; then
fi
git remote remove origin 2>/dev/null
GITURL="$GITEA_URL/$GITEA_USER/$REPO_VALID.git"
GITURL="https://$GITEA_USER:$GITEA_TOKEN@gitea.kasimirat.de/$GITEA_USER/$REPO_VALID.git"
git remote add origin "$GITURL"
echo "Welche Dateien sollen zum Commit hinzugefügt werden?"
@ -114,13 +114,4 @@ So stellst du den Standard-Branch in Gitea auf 'main' um:
4. Wähle im Dropdown 'main' aus.
5. Klicke auf 'Save' oder 'Speichern'.
Jetzt ist 'main' der Standard-Branch und wird beim Öffnen des Repos angezeigt.
GITEA_BRANCH_HELP
# Setze Standard-Branch auf main per Gitea-API (nur bei Neuanlage)
if [ "$NEWREPO" = "1" ]; then
curl -s -X PATCH -H "Content-Type: application/json" -H "Authorization: token $GITEA_TOKEN" \
-d '{"default_branch":"main"}' "$GITEA_URL/api/v1/repos/$GITEA_USER/$REPO_VALID" > /dev/null
echo "Upload abgeschlossen. Repo: $GITURL (neu angelegt, Standard-Branch: main)"
else
echo "Upload abgeschlossen. Repo: $GITURL (bestehendes Repo aktualisiert)"
fi
GITEA_BRANCH_HELP