issue #543: create ~/.ssh if it doesn't exist

This commit is contained in:
David Wilson 2019-07-31 00:22:59 +01:00
parent 0741876392
commit edb745f434
1 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,10 @@ with ci_lib.Fold('job_setup'):
with ci_lib.Fold('machine_prep'):
ssh_dir = os.path.expanduser('~/.ssh')
if not os.path.exists(ssh_dir):
os.makedirs(ssh_dir, int('0700', 8))
key_path = os.path.expanduser('~/.ssh/id_rsa')
shutil.copy(KEY_PATH, key_path)