Working on getting everything right.
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
@@ -22,13 +22,34 @@ jobs:
|
|||||||
|
|
||||||
cd ${{ github.workspace }}
|
cd ${{ github.workspace }}
|
||||||
|
|
||||||
# Configure git for better compatibility with SSL issues
|
# Test if SSH access is already configured
|
||||||
git config --global http.sslverify false
|
echo "Testing SSH connectivity..."
|
||||||
git config --global http.postBuffer 524288000
|
mkdir -p ~/.ssh
|
||||||
|
|
||||||
|
# Try internal network access first (runner to gitea server)
|
||||||
|
echo "Testing internal SSH connectivity to gitea:22..."
|
||||||
|
ssh-keyscan -p 22 -H gitea >> ~/.ssh/known_hosts 2>/dev/null || echo "Internal SSH keyscan completed"
|
||||||
|
|
||||||
|
# Try external SSH access
|
||||||
|
echo "Testing external SSH connectivity to dogar.darkhelm.org:2222..."
|
||||||
|
ssh-keyscan -p 2222 -H dogar.darkhelm.org >> ~/.ssh/known_hosts 2>/dev/null || echo "External SSH keyscan completed"
|
||||||
|
|
||||||
|
# Check if we can connect via SSH (try internal first, then external)
|
||||||
|
if ssh -T git@gitea 2>&1 | grep -q "successfully authenticated\|Hi.*You've successfully authenticated"; then
|
||||||
|
echo "✓ Internal SSH authentication successful - using internal SSH clone"
|
||||||
|
git clone --depth 1 git@gitea:DarkHelm.org/plex-playlist.git .
|
||||||
|
elif ssh -T -p 2222 git@dogar.darkhelm.org 2>&1 | grep -q "successfully authenticated\|Hi.*You've successfully authenticated"; then
|
||||||
|
echo "✓ External SSH authentication successful - using external SSH clone"
|
||||||
|
git clone --depth 1 ssh://git@dogar.darkhelm.org:2222/DarkHelm.org/plex-playlist.git .
|
||||||
|
else
|
||||||
|
echo "⚠ SSH authentication failed - checking available SSH keys"
|
||||||
|
ls -la ~/.ssh/ || echo "No ~/.ssh directory"
|
||||||
|
echo "Available environment variables:"
|
||||||
|
env | grep -i ssh || echo "No SSH-related environment variables"
|
||||||
|
echo "Falling back to HTTP clone..."
|
||||||
|
git clone --depth 1 http://dogar.darkhelm.org/DarkHelm.org/plex-playlist.git .
|
||||||
|
fi
|
||||||
|
|
||||||
# Try HTTP instead of HTTPS to avoid SSL issues
|
|
||||||
echo "Attempting HTTP clone to avoid SSL issues..."
|
|
||||||
git clone --depth 1 http://dogar.darkhelm.org/DarkHelm.org/plex-playlist.git .
|
|
||||||
git checkout ${{ github.sha }} 2>/dev/null || echo "Using HEAD commit"
|
git checkout ${{ github.sha }} 2>/dev/null || echo "Using HEAD commit"
|
||||||
|
|
||||||
echo "Repository contents:"
|
echo "Repository contents:"
|
||||||
@@ -120,12 +141,34 @@ jobs:
|
|||||||
|
|
||||||
cd ${{ github.workspace }}
|
cd ${{ github.workspace }}
|
||||||
|
|
||||||
# Configure git for better compatibility with SSL issues
|
# Test if SSH access is already configured
|
||||||
git config --global http.sslverify false
|
echo "Testing SSH connectivity..."
|
||||||
git config --global http.postBuffer 524288000
|
mkdir -p ~/.ssh
|
||||||
|
|
||||||
|
# Try internal network access first (runner to gitea server)
|
||||||
|
echo "Testing internal SSH connectivity to gitea:22..."
|
||||||
|
ssh-keyscan -p 22 -H gitea >> ~/.ssh/known_hosts 2>/dev/null || echo "Internal SSH keyscan completed"
|
||||||
|
|
||||||
|
# Try external SSH access
|
||||||
|
echo "Testing external SSH connectivity to dogar.darkhelm.org:2222..."
|
||||||
|
ssh-keyscan -p 2222 -H dogar.darkhelm.org >> ~/.ssh/known_hosts 2>/dev/null || echo "External SSH keyscan completed"
|
||||||
|
|
||||||
|
# Check if we can connect via SSH (try internal first, then external)
|
||||||
|
if ssh -T git@gitea 2>&1 | grep -q "successfully authenticated\|Hi.*You've successfully authenticated"; then
|
||||||
|
echo "✓ Internal SSH authentication successful - using internal SSH clone"
|
||||||
|
git clone --depth 1 git@gitea:DarkHelm.org/plex-playlist.git .
|
||||||
|
elif ssh -T -p 2222 git@dogar.darkhelm.org 2>&1 | grep -q "successfully authenticated\|Hi.*You've successfully authenticated"; then
|
||||||
|
echo "✓ External SSH authentication successful - using external SSH clone"
|
||||||
|
git clone --depth 1 ssh://git@dogar.darkhelm.org:2222/DarkHelm.org/plex-playlist.git .
|
||||||
|
else
|
||||||
|
echo "⚠ SSH authentication failed - checking available SSH keys"
|
||||||
|
ls -la ~/.ssh/ || echo "No ~/.ssh directory"
|
||||||
|
echo "Available environment variables:"
|
||||||
|
env | grep -i ssh || echo "No SSH-related environment variables"
|
||||||
|
echo "Falling back to HTTP clone..."
|
||||||
|
git clone --depth 1 http://dogar.darkhelm.org/DarkHelm.org/plex-playlist.git .
|
||||||
|
fi
|
||||||
|
|
||||||
# Clone the repository
|
|
||||||
git clone --depth 1 https://dogar.darkhelm.org/DarkHelm.org/plex-playlist.git .
|
|
||||||
git checkout ${{ github.sha }} 2>/dev/null || echo "Using HEAD commit"
|
git checkout ${{ github.sha }} 2>/dev/null || echo "Using HEAD commit"
|
||||||
|
|
||||||
echo "Repository contents:"
|
echo "Repository contents:"
|
||||||
|
|||||||
Reference in New Issue
Block a user