Skip to content

Commit 4bfc897

Browse files
authored
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.
1 parent 9e58a67 commit 4bfc897

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

assets/build/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ sed -i \
246246
-e "s|^[#]*LogLevel INFO|LogLevel VERBOSE|" \
247247
-e "s|^[#]*AuthorizedKeysFile.*|AuthorizedKeysFile %h/.ssh/authorized_keys %h/.ssh/authorized_keys_proxy|" \
248248
/etc/ssh/sshd_config
249+
echo "AcceptEnv GIT_PROTOCOL" >> /etc/ssh/sshd_config # Allow clients to explicitly set the Git transfer protocol, e.g. to enable version 2.
249250
echo "UseDNS no" >> /etc/ssh/sshd_config
250251

251252
# move supervisord.log file to ${GITLAB_LOG_DIR}/supervisor/

0 commit comments

Comments
 (0)