From 38f36cb7f01918c058094618db5bbb80f6ed7299 Mon Sep 17 00:00:00 2001 From: Stefan Daehnert Date: Fri, 20 Nov 2026 16:07:08 +0100 Subject: [PATCH] Add test for ssh key. --- .gitea/workflows/ssh-debug.yml | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitea/workflows/ssh-debug.yml diff --git a/.gitea/workflows/ssh-debug.yml b/.gitea/workflows/ssh-debug.yml new file mode 100644 index 0000000..ad3c96e --- /dev/null +++ b/.gitea/workflows/ssh-debug.yml @@ -0,0 +1,37 @@ +name: SSH Debug Test + +on: + workflow_dispatch: + +jobs: + ssh-debug: + runs-on: linux-mint + env: + UNITY_SSH_KEY: ${{ secrets.TESTFMODPIPELINE }} + GITEA_HOST: git.hbrsgamedev.team + steps: + - name: Check Environment and Key Presence + run: | + echo "USER: $(whoami)" + echo "HOME: $HOME" + echo "PWD: $(pwd)" + if [ -z "$UNITY_SSH_KEY" ]; then + echo "FEHLER: Secret TESTFMODPIPELINE ist leer!" + exit 1 + fi + echo "Secret-Laenge in Zeichen: ${#UNITY_SSH_KEY}" + echo "Erste Zeile: $(printf '%s\n' "$UNITY_SSH_KEY" | head -n 1)" + echo "Letzte Zeile: $(printf '%s\n' "$UNITY_SSH_KEY" | tail -n 1)" + + - name: Test SSH Handshake Verbose + run: | + mkdir -p ./.ssh_test + chmod 700 ./.ssh_test + printf "%s\n" "$UNITY_SSH_KEY" > ./.ssh_test/id_test + chmod 600 ./.ssh_test/id_test + ssh -vvv -T \ + -i ./.ssh_test/id_test \ + -o IdentitiesOnly=yes \ + -o StrictHostKeyChecking=accept-new \ + "git@${GITEA_HOST}" || true + rm -rf ./.ssh_test \ No newline at end of file