githttp

package
v14.57.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package githttp provides functionality to handle Git operations over HTTP(S) and SSH, including executing Git commands like git-upload-pack and converting responses to the expected format for SSH protocols. It integrates with GitLab's internal components for secure access verification and data transfer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CellsPullCommand added in v14.57.3

type CellsPullCommand struct {
	Config     *config.Config
	ReadWriter *readwriter.ReadWriter
	Args       *commandargs.Shell
	Response   *accessverifier.Response
}

CellsPullCommand handles git pull (upload-pack) via SSH-over-HTTP for Cells routing. When the Topology Service routes to a different Cell, Gitaly is not directly reachable, so it proxies SSH pack data through the Cell's Workhorse via POST /{repo}.git/ssh-upload-pack.

func NewCellsPullCommand added in v14.56.0

func NewCellsPullCommand(cfg *config.Config, rw *readwriter.ReadWriter, args *commandargs.Shell, resp *accessverifier.Response) *CellsPullCommand

NewCellsPullCommand builds a Cells SSH-over-HTTP upload-pack command.

func (*CellsPullCommand) Execute added in v14.57.3

func (c *CellsPullCommand) Execute(ctx context.Context) error

Execute runs a Cells SSH-over-HTTP upload-pack request.

type CellsPushCommand added in v14.57.3

type CellsPushCommand struct {
	Config     *config.Config
	ReadWriter *readwriter.ReadWriter
	Args       *commandargs.Shell
	Response   *accessverifier.Response
}

CellsPushCommand handles git push (receive-pack) via SSH-over-HTTP for Cells routing. When the Topology Service routes to a different Cell, Gitaly is not directly reachable, so it proxies SSH pack data through the Cell's Workhorse via POST /{repo}.git/ssh-receive-pack.

func NewCellsPushCommand added in v14.56.0

func NewCellsPushCommand(cfg *config.Config, rw *readwriter.ReadWriter, args *commandargs.Shell, resp *accessverifier.Response) *CellsPushCommand

NewCellsPushCommand builds a Cells SSH-over-HTTP receive-pack command.

func (*CellsPushCommand) Execute added in v14.57.3

func (c *CellsPushCommand) Execute(ctx context.Context) error

Execute runs a Cells SSH-over-HTTP receive-pack request.

type PullCommand added in v14.28.0

type PullCommand struct {
	Config     *config.Config
	ReadWriter *readwriter.ReadWriter
	Args       *commandargs.Shell
	Response   *accessverifier.Response
}

PullCommand handles the execution of a Git pull operation over HTTP(S) or SSH

func (*PullCommand) Execute added in v14.28.0

func (c *PullCommand) Execute(ctx context.Context) error

Execute runs the pull command by determining the appropriate method (HTTP/SSH)

func (*PullCommand) ForInfoRefs added in v14.40.0

func (c *PullCommand) ForInfoRefs() (*readwriter.ReadWriter, string, []byte)

ForInfoRefs returns the necessary Pull specifics for client.InfoRefs()

type PushCommand

type PushCommand struct {
	Config     *config.Config
	ReadWriter *readwriter.ReadWriter
	Response   *accessverifier.Response
	Args       *commandargs.Shell
}

PushCommand handles the execution of a Git push operation, including configuration, input/output handling, and access verification.

func (*PushCommand) Execute

func (c *PushCommand) Execute(ctx context.Context) error

Execute runs the push command by determining the appropriate method (HTTP/SSH)

func (*PushCommand) ForInfoRefs added in v14.40.0

func (c *PushCommand) ForInfoRefs() (*readwriter.ReadWriter, string, []byte)

ForInfoRefs returns the necessary Push specifics for client.InfoRefs()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL