Skip to content

Conversation

@geropl
Copy link
Member

@geropl geropl commented Jan 12, 2026

Problem

previewctl install-context fails with exit status 1 when generating SSH keys because the HOME directory doesn't exist.

Root Cause

Commit 80317ca converted deploy-gitpod from a Docker-based action to a composite action. The old Docker action explicitly set export HOME=/home/gitpod, but the composite action inherits GitHub Actions' default HOME=/github/home, which doesn't exist in the container.

Saving key "/github/home/.ssh/vm_ed25519" failed: No such file or directory

Validation

Tested locally with the dev-environment container:

$ docker run --rm -e HOME=/github/home eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:gpl-npm-oidc-support-gha.42 \
  bash -c 'ssh-keygen -t ed25519 -q -N "" -f "$HOME/.ssh/vm_ed25519"'
Saving key "/github/home/.ssh/vm_ed25519" failed: No such file or directory

$ docker run --rm -e HOME=/github/home eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:gpl-npm-oidc-support-gha.42 \
  bash -c 'export HOME=/home/gitpod; mkdir -p $HOME/.ssh; ssh-keygen -t ed25519 -q -N "" -f "$HOME/.ssh/vm_ed25519" && echo SUCCESS'
SUCCESS

Solution

Restore export HOME=/home/gitpod in the deploy-gitpod action to match the original Docker-based action behavior.

GitHub Actions sets HOME=/github/home when running in a container, but
this directory doesn't exist in the dev-environment image. This causes
previewctl install-context to fail when generating SSH keys.

Restore HOME=/home/gitpod to match the original Docker-based action
behavior from before commit 80317ca.

Co-authored-by: Ona <no-reply@ona.com>
@geropl geropl merged commit 085cec1 into main Jan 13, 2026
36 checks passed
geropl added a commit that referenced this pull request Jan 13, 2026
The previous fix (#21252) only applied HOME=/home/gitpod to the
'Deploy Gitpod' step, but the 'Install previewctl' step runs first
and also needs the fix.

Leeway fails with 'getwd: no such file or directory' when HOME points
to a non-existent directory.

Validated locally:
  docker run --rm --user root -e HOME=/github/home ...
  leeway run dev/preview/previewctl:install
  # Fails: getwd: no such file or directory

  docker run --rm --user root -e HOME=/github/home ...
  export HOME=/home/gitpod
  leeway run dev/preview/previewctl:install
  # Succeeds

Co-authored-by: Ona <no-reply@ona.com>
geropl added a commit that referenced this pull request Jan 13, 2026
The previous fix (#21252) only applied HOME=/home/gitpod to the
'Deploy Gitpod' step, but the 'Install previewctl' step runs first
and also needs the fix.

Leeway fails with 'getwd: no such file or directory' when HOME points
to a non-existent directory.

Validated locally:
  docker run --rm --user root -e HOME=/github/home ...
  leeway run dev/preview/previewctl:install
  # Fails: getwd: no such file or directory

  docker run --rm --user root -e HOME=/github/home ...
  export HOME=/home/gitpod
  leeway run dev/preview/previewctl:install
  # Succeeds

Co-authored-by: Ona <no-reply@ona.com>
geropl added a commit that referenced this pull request Jan 13, 2026
The previous fix (#21252) only applied HOME=/home/gitpod to the
'Deploy Gitpod' step, but the 'Install previewctl' step runs first
and also needs the fix.

Leeway fails with 'getwd: no such file or directory' when HOME points
to a non-existent directory.

Validated locally:
  docker run --rm --user root -e HOME=/github/home ...
  leeway run dev/preview/previewctl:install
  # Fails: getwd: no such file or directory

  docker run --rm --user root -e HOME=/github/home ...
  export HOME=/home/gitpod
  leeway run dev/preview/previewctl:install
  # Succeeds

Co-authored-by: Ona <no-reply@ona.com>
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