From 4afe00a348f6418d3688b9dff4f2a1ef7465947e Mon Sep 17 00:00:00 2001 From: Jiri Uhlir Date: Wed, 20 May 2026 13:29:46 +0200 Subject: [PATCH] Use token for non-interactive Git push --- scripts/new-python-app.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/new-python-app.sh b/scripts/new-python-app.sh index 7f4dcd9..ffc9ba3 100755 --- a/scripts/new-python-app.sh +++ b/scripts/new-python-app.sh @@ -110,11 +110,13 @@ if grep -q '"message"' /tmp/appfactory-create-hook-response.json; then cat /tmp/appfactory-create-hook-response.json fi +git config --global init.defaultBranch main || true git init git config user.name "AppFactory Bot" git config user.email "appfactory@local" git branch -M main -git remote add origin "$GITEA_URL/$GITEA_ORG/$APP_ID.git" +GITEA_PUSH_URL="${GITEA_URL/http:\/\//http:\/\/${GITEA_TOKEN}@}" +git remote add origin "$GITEA_PUSH_URL/$GITEA_ORG/$APP_ID.git" git add . git commit -m "Initial $APP_NAME"