#!/bin/bash set -euo pipefail echo "Testing Docker authentication with git.sschuhmann.de..." # Test 1: Check if Docker is running echo "1. Checking Docker daemon..." if docker info >/dev/null 2>&1; then echo " ✅ Docker daemon is running" else echo " ❌ Docker daemon is not running" exit 1 fi # Test 2: Check if we're logged in to any registry echo "2. Checking Docker login status..." if docker system df >/dev/null 2>&1; then echo " ✅ Docker commands work" else echo " ❌ Docker commands failed" exit 1 fi # Test 3: Try to access the Gitea registry echo "3. Testing Gitea registry access..." echo " Trying to pull a test image (this may fail if image doesn't exist)..." # Use a simple curl test instead of docker manifest echo "4. Testing registry with curl..." REGISTRY_URL="https://git.sschuhmann.de" if command -v curl >/dev/null 2>&1; then if curl -s -o /dev/null -w "%{http_code}" "$REGISTRY_URL" | grep -q "^[23]"; then echo " ✅ Registry is accessible" else echo " ⚠️ Registry accessible but may require authentication" fi else echo " ⚠️ curl not available, skipping HTTP test" fi echo "" echo "Authentication test complete!" echo "If you're still having issues, try:" echo " 1. docker logout git.sschuhmann.de" echo " 2. docker login git.sschuhmann.de" echo " 3. cat ~/.docker/config.json (check credentials)"