From 4bfc8974ba0f3fe9cb3614e6e57c828e6e85c793 Mon Sep 17 00:00:00 2001 From: Markus Zimmermann Date: Fri, 24 Mar 2023 11:55:42 +0100 Subject: [PATCH] Allow SSH clients to explicitly set the Git transfer protocol This allows to the client to explicitly select protocol version 2, which is much more efficient. Without allowing that environment variable it seems that SSH connections are always stuck in version1. See https://docs.gitlab.com/ee/administration/git_protocol.html on how to check if protocol 2 is used. --- assets/build/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/build/install.sh b/assets/build/install.sh index 774aaa6a..ffeb4d08 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -246,6 +246,7 @@ sed -i \ -e "s|^[#]*LogLevel INFO|LogLevel VERBOSE|" \ -e "s|^[#]*AuthorizedKeysFile.*|AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_proxy|" \ /etc/ssh/sshd_config +echo "AcceptEnv GIT_PROTOCOL" >> /etc/ssh/sshd_config # Allow clients to explicitly set the Git transfer protocol, e.g. to enable version 2. echo "UseDNS no" >> /etc/ssh/sshd_config # move supervisord.log file to ${GITLAB_LOG_DIR}/supervisor/