fix: pre-create ~/.ssh/known_hosts if it doesn't exist #488
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The CLI was failing when users didn't have a ~/.ssh/known_hosts file. Now creates both the .ssh directory (0700) and known_hosts file (0600) with proper permissions if they don't exist. It's not really valid to assume that it already exists (and it doesn't in a test environment like DDEV's automated tests)
It used to fail on
lagoon sshfor example:This also fixes the odd output
I think
lagoon-sync configjust failed because known_hosts wasn't there, leading the logic to conclude that there was no lagoon-sync.This was discovered exploring the problems in