ssh

package
v0.0.0-...-cd5f126 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Addr               string
	RepoRoot           string
	HostKeyPath        string
	AuthorizedKeysPath string
	UploadPackPath     string
	ReceivePackPath    string
	BaseEnv            []string
	GracefulTimeout    time.Duration
}

Server exposes a minimal SSH endpoint that only accepts git-upload-pack and git-receive-pack. Public key authentication is enforced via an authorized_keys file.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(ctx context.Context) error

ListenAndServe starts the SSH server and blocks until the context is cancelled or the server stops.

Jump to

Keyboard shortcuts

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