Skip to content

fix: replace cryptic SSH "missing server host" failure with actionable secrets validation - #2

Draft
mudabs with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-deploy-to-vps-job-again
Draft

mudabs with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-deploy-to-vps-job-again

Conversation

Copilot AI commented Jul 24, 2026 •

Copy link
Copy Markdown

The "Deploy to VPS" job was failing immediately with Error: missing server host because none of the four required secrets (VPS_HOST, VPS_USER, VPS_SSH_KEY, VPS_APP_DIR) were configured — appleboy/ssh-action receives empty strings and aborts with no guidance on what to set.

Changes

  • Added Check required secrets pre-flight step — validates all four secrets are non-empty before the SSH action runs; fails with a structured error listing exactly which secrets are missing and where to add them:
    ::error::Required secrets not configured: VPS_HOST VPS_USER VPS_SSH_KEY VPS_APP_DIR
    Add these secrets in: Settings → Secrets and variables → Actions
    
  • Quoted VPS_APP_DIR in cd — cd ${{ secrets.VPS_APP_DIR }} → cd "${{ secrets.VPS_APP_DIR }}" to correctly handle paths containing spaces.

Required follow-up

The repository owner must add these four secrets under Settings → Secrets and variables → Actions:

Secret Value
VPS_HOST VPS IP / hostname
VPS_USER SSH login username
VPS_SSH_KEY Private SSH key
VPS_APP_DIR Absolute path to app on VPS (e.g. /home/ubuntu/apps/eventshare)

Copilot AI changed the title [WIP] Fix failing GitHub Actions job Deploy to VPS fix: replace cryptic SSH "missing server host" failure with actionable secrets validation Jul 24, 2026
Copilot AI requested a review from mudabs July 24, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants