Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab
GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 34,951
    • Issues 34,951
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 1,268
    • Merge Requests 1,268
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #207798

Closed
Open
Opened Feb 24, 2020 by James Ramsay@jramsay-gitlab⚡Maintainer

Re-enable Git procotol v2 for SSH

Problem to solve

SSH support was not implemented enabled in #27828 (closed), this should be fixed.

Further details

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.

Proposal

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)).

Then, all relevant distributions of GitLab that configure SSHD should be updated to accept and pass the GIT_PROTOCOL env var (omnibus-gitlab#5093 (closed) & gitlab-development-kit#812 (closed)).

Links / references

Edited Feb 24, 2020 by Paul Okstad
Assignee
Assign to
12.9
Milestone
12.9 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: gitlab-org/gitlab#207798