Skip to content

stacker target server doesn't use EXISTING_SERVER_KEY from .env #225

Description

@vsilent

Description

When switching target to an existing server, the CLI stores ssh_key: null in the deployment lock instead of reading EXISTING_SERVER_KEY from the environment.

Affected Projects

Mastodon

Steps to Reproduce

  1. Define EXISTING_SERVER_KEY=./stacker-project-test in .env
  2. Source .env
  3. Run stacker target server with piped input
  4. Inspect .stacker/deployment-server.lock

Expected Behavior

ssh_key in the lock file should be set to the provided key path.

Actual Behavior

ssh_key: null is written to the lock file. Subsequent deploys fail with:

Authentication failed: Public key authentication failed

Current Workaround

Manually edit .stacker/deployment-server.lock to set ssh_key to the correct path.

Environment

  • Stacker CLI version: latest
  • Deploy target: server

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions