name: Diagnose SSH to Flux-oss on: workflow_dispatch: push: branches: [ main ] jobs: diag: runs-on: ubuntu-latest steps: - name: Print runner info run: | uname -a df -h free -h || true - name: Ensure secret is present env: SSH_KEY: ${{ secrets.PUBLIC_REPO_SSH_KEY }} run: | if [ -z "$SSH_KEY" ]; then echo "Secret PUBLIC_REPO_SSH_KEY is missing"; exit 1 fi echo "Secret length: ${#SSH_KEY}" - name: Prepare SSH env: SSH_KEY: ${{ secrets.PUBLIC_REPO_SSH_KEY }} run: | set -euo pipefail mkdir -p ~/.ssh echo "$SSH_KEY" > ~/.ssh/id_sync chmod 600 ~/.ssh/id_sync printf 'Host gitea-lan\n HostName 192.168.1.15\n Port 22\n User git\n IdentityFile ~/.ssh/id_sync\n IdentitiesOnly yes\n' >> ~/.ssh/config ssh-keyscan -p 22 192.168.1.15 >> ~/.ssh/known_hosts - name: Test SSH auth to server run: | ssh -T gitea-lan || true - name: Test Git access to Flux-oss run: | git ls-remote ssh://gitea-lan/Bausager/Flux-oss.git