Re-enable Git procotol v2 for SSH
Problem to solve
SSH support was not implemented enabled in #27828 (closed), this should be fixed.
In #27828 (closed), Gitaly re-enabled protocol v2 support via feature flag, and then removed it when no problems were found after testing. Unfortunately, we only verified HTTP worked properly before removing the feature flag. SSHD does not succeed in end-to-end tests.
When Git uses an SSH transport to clone/interact with a repository, it will attempt to send the environment variable
GIT_PROTOCOL to the remote SSHD service. It appears that both SSHD configurations in Omnibus (omnibus-gitlab#5093 (closed)), and GDK (gitlab-development-kit#812 (closed)) do not support passing this environment variable to gitlab-shell.
Additionally, gitlab-shell needs to source this environment variable and inject it into the Gitaly request (gitlab-shell#273 (closed)). Currently, gitlab-shell depends on gitlab-rails to provide this value, which doesn't make sense since gitlab-rails is not aware of which protocol the client requested.
Finish enabling Git protocol v2.
First, gitlab-shell should be updated to source and propagate the
GIT_PROTOCOL env var to Gitaly for all SSH RPCs (gitlab-shell#273 (closed)).