From 69252db6ab5348137235e00783777c5facf4afdc Mon Sep 17 00:00:00 2001 From: Cliff Hill Date: Sat, 25 Oct 2025 21:43:38 -0400 Subject: [PATCH] More SSH debugging. Signed-off-by: Cliff Hill --- .gitea/workflows/tests.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index 7222f9b..ec0a819 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -33,15 +33,35 @@ jobs: # Debug SSH keys and connectivity echo "=== SSH Debug Info ===" + echo "Checking ~/.ssh/:" ls -la ~/.ssh/ 2>/dev/null || echo "No ~/.ssh directory" + echo "Checking /data/.ssh/:" + ls -la /data/.ssh/ 2>/dev/null || echo "No /data/.ssh directory" + echo "Current user: $(whoami)" + echo "Current HOME: $HOME" + + # Copy SSH keys to proper location if they exist + if [ -d "/data/.ssh" ]; then + echo "Copying SSH keys from /data/.ssh to ~/.ssh" + mkdir -p ~/.ssh + cp -r /data/.ssh/* ~/.ssh/ 2>/dev/null || true + chmod 700 ~/.ssh + chmod 600 ~/.ssh/* 2>/dev/null || true + ls -la ~/.ssh/ + fi + ssh-keyscan -p 2222 dogar.darkhelm.org 2>/dev/null || echo "SSH keyscan failed" # Try clone methods with better debugging echo "=== Attempting Clone Methods ===" + # Test SSH connection first + echo "Testing SSH connection directly..." + ssh -o StrictHostKeyChecking=no -p 2222 git@dogar.darkhelm.org 2>&1 || echo "SSH test completed" + # Method 1: SSH external (most reliable if keys work) echo "Trying SSH external (dogar.darkhelm.org:2222)..." - if GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no" git clone --depth 1 --branch main ssh://git@dogar.darkhelm.org:2222/DarkHelm.org/plex-playlist.git . 2>&1; then + if GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" git clone --depth 1 --branch main ssh://git@dogar.darkhelm.org:2222/DarkHelm.org/plex-playlist.git . 2>&1; then echo "✓ External SSH clone successful" # Method 2: Internal SSH (kankali runner only) elif echo "Trying internal SSH (gitea:3000)..." && GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no" git clone --depth 1 --branch main git@gitea:3000/DarkHelm.org/plex-playlist.git . 2>&1; then @@ -49,7 +69,10 @@ jobs: # Method 3: Internal HTTP (kankali runner only) elif echo "Trying internal HTTP (gitea:3000)..." && git clone --depth 1 --branch main http://gitea:3000/DarkHelm.org/plex-playlist.git . 2>&1; then echo "✓ Internal HTTP clone successful (kankali-runner only)" - # Method 4: HTTPS with SSL verification disabled + # Method 4: HTTPS with token (for private repo access) + elif echo "Trying HTTPS with token..." && git -c http.sslVerify=false clone --depth 1 --branch main "https://token:${{ secrets.GITEA_TOKEN }}@dogar.darkhelm.org/DarkHelm.org/plex-playlist.git" . 2>&1; then + echo "✓ External HTTPS clone with token successful" + # Method 5: HTTPS with SSL verification disabled (fallback) elif echo "Trying HTTPS with SSL disabled..." && git -c http.sslVerify=false clone --depth 1 --branch main https://dogar.darkhelm.org/DarkHelm.org/plex-playlist.git . 2>&1; then echo "✓ External HTTPS clone successful (SSL verification disabled)" # Method 5: HTTP external