gitserver

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Embedded = true

Variables

This section is empty.

Functions

func CurrentUser

func CurrentUser() (*user.User, error)

func ExecWithUid

func ExecWithUid(uid, gid uint32, name string, args ...string) *exec.Cmd

func GetUid

func GetUid(username string, current bool) (uid uint32, gid uint32, err error)

func LookupUser

func LookupUser(username string) (*user.User, error)

func ServeGitShell

func ServeGitShell(config *Config, ctx context.Context) error

Types

type Config

type Config struct {
	Enable bool `toml:"enable"`

	User        string `toml:"user"`
	CurrentUser bool   `toml:"current_user"`
	SSHUser     string `toml:"ssh_user"`

	GitShell    string `toml:"git_shell"`
	GitUserHome string `toml:"git_user_home"`

	AuthorizedKeys string `toml:"authorized_keys"`
	WatchKeys      bool   `toml:"watch_keys"`

	MaxGitShellProcesses int  `toml:"max_git_shell_processes"`
	RefuseWhenBusy       bool `toml:"refuse_when_busy"`
}

func (*Config) FillDefault

func (c *Config) FillDefault() error

Jump to

Keyboard shortcuts

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