Documentation
¶
Overview ¶
Package gitexec runs authenticated, non-interactive Git commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client runs Git with host-scoped HTTPS authentication.
func New ¶
func New(host string, tokens TokenSource) (*Client, error)
New constructs an authenticated Git client using the GitHub HTTPS username convention.
func NewWithUsername ¶ added in v0.10.266
func NewWithUsername(host string, tokens TokenSource, username string) (*Client, error)
NewWithUsername constructs an authenticated Git client whose HTTPS basic auth pairs the given username with the token (for example GitLab expects "oauth2").
type TokenSource ¶
TokenSource supplies the current repository access token.
type TokenSourceFunc ¶
TokenSourceFunc adapts a function to TokenSource.
func (TokenSourceFunc) AccessToken ¶
func (f TokenSourceFunc) AccessToken(ctx context.Context) (string, error)
AccessToken returns the current token.
Click to show internal directories.
Click to hide internal directories.