As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit aaa6c882 authored by Ash McKenzie's avatar Ash McKenzie
Browse files

Merge branch 'ps-git-protocol-envvar' into 'master'

commands: pass through GIT_PROTOCOL envvar provided by clients

Closes #273

See merge request gitlab-org/gitlab-shell!364
parents 9e753378 cab69fad
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -15,6 +15,8 @@ const (
ReceivePack CommandType = "git-receive-pack"
UploadPack CommandType = "git-upload-pack"
UploadArchive CommandType = "git-upload-archive"
GitProtocolEnv = "GIT_PROTOCOL"
)
var (
Loading
Loading
Loading
Loading
@@ -2,6 +2,7 @@ package receivepack
import (
"context"
"os"
"google.golang.org/grpc"
Loading
Loading
@@ -26,7 +27,7 @@ func (c *Command) performGitalyCall(response *accessverifier.Response) error {
GlId: response.UserId,
GlRepository: response.Repo,
GlUsername: response.Username,
GitProtocol: response.GitProtocol,
GitProtocol: os.Getenv(commandargs.GitProtocolEnv),
GitConfigOptions: response.GitConfigOptions,
}
Loading
Loading
Loading
Loading
@@ -2,6 +2,7 @@ package uploadpack
import (
"context"
"os"
"google.golang.org/grpc"
Loading
Loading
@@ -23,7 +24,7 @@ func (c *Command) performGitalyCall(response *accessverifier.Response) error {
request := &pb.SSHUploadPackRequest{
Repository: &response.Gitaly.Repo,
GitProtocol: response.GitProtocol,
GitProtocol: os.Getenv(commandargs.GitProtocolEnv),
GitConfigOptions: response.GitConfigOptions,
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment