Add test for ssh key.
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user