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
- Define
EXISTING_SERVER_KEY=./stacker-project-test in .env
- Source .env
- Run
stacker target server with piped input
- 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
Description
When switching target to an existing server, the CLI stores
ssh_key: nullin the deployment lock instead of readingEXISTING_SERVER_KEYfrom the environment.Affected Projects
Mastodon
Steps to Reproduce
EXISTING_SERVER_KEY=./stacker-project-testin .envstacker target serverwith piped input.stacker/deployment-server.lockExpected Behavior
ssh_keyin the lock file should be set to the provided key path.Actual Behavior
ssh_key: nullis written to the lock file. Subsequent deploys fail with:Current Workaround
Manually edit
.stacker/deployment-server.lockto setssh_keyto the correct path.Environment