From d03837b47f6f80d0977449a74fc5bdd49020ea28 Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Fri, 18 Oct 2024 18:15:08 +0200 Subject: [PATCH] Better comment about scp vs. sftp --- .github/scripts/common.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/scripts/common.py b/.github/scripts/common.py index 78548b4e..3863f2bf 100644 --- a/.github/scripts/common.py +++ b/.github/scripts/common.py @@ -310,7 +310,10 @@ def upload(file_to_upload, host, dest_path): else: port = "22" - # sending SFTP mkdir command to the sftp interactive mode and not batch (-b) mode + # Using SFTP to create the directory hierarchy because we can not + # use SSH (no shell for this user); and then scp to upload the file. + # + # Sending SFTP mkdir command to the SFTP interactive mode and not batch (-b) mode # as the latter would exit on any mkdir error while it is most likely # the first parts of the destination is already present and thus can't be created sftp_commands = "\n".join( @@ -321,6 +324,8 @@ def upload(file_to_upload, host, dest_path): ) command = [ "sftp", + "-c", + "aes128-ctr", "-i", _environ.get("SSH_KEY"), "-P",