gitcredentials

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MPL-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureHelper

func ConfigureHelper(binaryPath, userName string, port int) error

func GetLocalGitConfigPath added in v0.5.20

func GetLocalGitConfigPath(repoPath string) string

GetLocalGitConfigPath resolves the local git config for the specified repository path

func RemoveHelper

func RemoveHelper(userName string) error

func RemoveHelperFromPath

func RemoveHelperFromPath(gitConfigPath string) error

func SetUser

func SetUser(userName string, user *GitUser) error

func SetupGpgGitKey added in v0.5.0

func SetupGpgGitKey(gitSignKey string) error

func ToString

func ToString(credentials *GitCredentials) string

Types

type GitCredentials

type GitCredentials struct {
	Protocol string `json:"protocol,omitempty"`
	URL      string `json:"url,omitempty"`
	Host     string `json:"host,omitempty"`
	Path     string `json:"path,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

func GetCredentials

func GetCredentials(requestObj *GitCredentials) (*GitCredentials, error)

func Parse

func Parse(raw string) (*GitCredentials, error)

type GitUser

type GitUser struct {
	Name  string `json:"name,omitempty"`
	Email string `json:"email,omitempty"`
}

func GetUser

func GetUser(userName string) (*GitUser, error)

Jump to

Keyboard shortcuts

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