From 33f3260a4a2448e661ec8cc9b7863e6987b5e242 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 30 Apr 2023 20:39:50 +0000 Subject: [PATCH] tests: fix newlines in test keys for sshd on Windows Make sure these files get LF newlines on checkout. Before this patch a checked out libssh2 Git repository may have used CRLF newlines in text files, include test keys. Private keys with CRLF newlines could confuse sshd on Windows: ``` # sshd version: 'OpenSSH_9.2, OpenSSL 1.1.1t 7 Feb 2023' Unable to load host key "/d/a/libssh2/libssh2/tests/openssh_server/ssh_host_ed25519_key": invalid format Unable to load host key: /d/a/libssh2/libssh2/tests/openssh_server/ssh_host_ed25519_key ``` Ref: https://github.com/libssh2/libssh2/actions/runs/4846188677/jobs/8635575847#step:6:39 Cherry-picked from #1017 --- tests/openssh_server/.gitattributes | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tests/openssh_server/.gitattributes diff --git a/tests/openssh_server/.gitattributes b/tests/openssh_server/.gitattributes new file mode 100644 index 00000000..c4977be2 --- /dev/null +++ b/tests/openssh_server/.gitattributes @@ -0,0 +1,3 @@ +# OpenSSH requires LF EOLs in key files, even on Windows, where +# a git checkout checkout may set CRLF EOLs by default. +* text eol=lf