feat(workflows): ensure SSH dir exists before scanning host
Some checks failed
Test! / test (push) Failing after 1m17s
Some checks failed
Test! / test (push) Failing after 1m17s
Preemptively creating the `~/.ssh` directory before attempting to add the SSH server's host key to `known_hosts`. This change prevents potential failures in CI workflows where the `.ssh` directory might not exist on a fresh runner environment, ensuring a smoother and more reliable setup for SSH connections. This adjustment enhances the resilience of the testing workflow by avoiding errors related to missing directories, thereby improving automated testing reliability and efficiency.
This commit is contained in:
parent
efe8c1a37f
commit
c72c45f47b
1 changed files with 1 additions and 0 deletions
|
@ -36,6 +36,7 @@ jobs:
|
|||
|
||||
- name: Trust SSH server's host key (to prevent interactive prompt)
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
ssh-keyscan -p 2222 -H localhost >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Connect to SSH server using SSH key
|
||||
|
|
Loading…
Reference in a new issue