From 38b486ab2cf2f156ab17a1da971e00a3091f4f88 Mon Sep 17 00:00:00 2001 From: Clemens Hering Date: Sun, 9 Nov 2025 16:23:36 +0100 Subject: [PATCH] test local clone --- .gitea/workflows/deploy.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 13a8bf2..6cc0b64 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -19,6 +19,24 @@ jobs: build_and_deploy: runs-on: ubuntu-latest steps: + - name: Pre-clean Git global config (avoid https→ssh rewrite) + shell: bash + run: | + set -euo pipefail + git --version || true + echo "Global git config before:" || true + git config --global --list || true + # Remove any url.*.insteadof rules that force SSH for gitea.smb-corp.de + for key in $(git config --global --get-regexp '^url\\..*\\.insteadof$' 2>/dev/null | awk '{print $1}'); do + if echo "$key" | grep -qi 'gitea\\.smb-corp\\.de'; then + echo "Removing global mapping: $key" + git config --global --unset-all "$key" || true + fi + done + # Ensure no global sshCommand forces SSH + git config --global --unset-all core.sshCommand || true + echo "Global git config after:" || true + git config --global --list || true - name: Setup SSH for git/scp/rsync shell: bash run: | @@ -30,7 +48,6 @@ jobs: # Ensure host keys are present to avoid interactive prompts (ssh-keygen -F "$TARGET_HOST" >/dev/null || ssh-keyscan -H "$TARGET_HOST" >> ~/.ssh/known_hosts) || true (ssh-keygen -F gitea.smb-corp.de >/dev/null || ssh-keyscan -H gitea.smb-corp.de >> ~/.ssh/known_hosts) || true - git config --global url."ssh://git@gitea.smb-corp.de".insteadOf "https://gitea.smb-corp.de" - name: Checkout Repository uses: actions/checkout@v4