Documentation
¶
Index ¶
- Constants
- func CoAuthorTrailer(person Person) string
- func Save(ctx context.Context, store runtimetypes.Store, identity Identity) error
- func UserGitIdentity() (object.Signature, error)
- func VerifySignature(armored, message []byte) (ssh.PublicKey, error)
- type CommitSigner
- type HostCheck
- type Identity
- type Key
- type KeySource
- func (src KeySource) CheckHost(ctx context.Context, ref, host string) HostCheck
- func (src KeySource) CheckSigning(ref string) SigningCheck
- func (src KeySource) Discover() []Key
- func (src KeySource) Generate(comment string) (Key, error)
- func (src KeySource) HostKeyCallback(alias string) (ssh.HostKeyCallback, []string, error)
- func (src KeySource) Resolve(ctx context.Context, identity Identity, repoDir string) (*localtools.GitIdentity, error)
- func (src KeySource) Resolver(store runtimetypes.Store) localtools.GitIdentityResolver
- func (src KeySource) Signer(ref string) (ssh.Signer, func(), error)
- type Person
- type SigningCheck
Constants ¶
View Source
const ( HostReasonKeyUnusable = "key_unusable" HostReasonUnknownHost = "unknown_host" HostReasonUnreachable = "unreachable" HostReasonRejected = "key_rejected" HostReasonFailed = "failed" )
View Source
const ( PersonFromOverride = "override" PersonFromGit = "git" PersonFromGitConfig = "gitconfig" )
View Source
const ( ConfigName = "agent-git-name" ConfigEmail = "agent-git-email" ConfigKey = "agent-git-key" ConfigSign = "agent-git-sign" ConfigCreditMe = "agent-git-credit-me" ConfigCreditAs = "agent-git-credit-as" )
View Source
const GeneratedKeyName = "contenox_agent_ed25519"
Variables ¶
This section is empty.
Functions ¶
func CoAuthorTrailer ¶
func UserGitIdentity ¶
Types ¶
type CommitSigner ¶
type CommitSigner struct {
// contains filtered or unexported fields
}
func NewCommitSigner ¶
func NewCommitSigner(signer ssh.Signer) *CommitSigner
type Identity ¶
type Identity struct {
Name string `json:"name"`
Email string `json:"email"`
Key string `json:"key"`
Sign bool `json:"sign"`
CreditMe bool `json:"creditMe"`
CreditAs string `json:"creditAs"`
}
func (Identity) Normalized ¶
type KeySource ¶
type KeySource struct {
SSHDir string
Agent func() (agent.ExtendedAgent, func(), error)
}
func DefaultKeySource ¶
func DefaultKeySource() KeySource
func (KeySource) CheckSigning ¶
func (src KeySource) CheckSigning(ref string) SigningCheck
func (KeySource) HostKeyCallback ¶
func (KeySource) Resolve ¶
func (src KeySource) Resolve(ctx context.Context, identity Identity, repoDir string) (*localtools.GitIdentity, error)
func (KeySource) Resolver ¶
func (src KeySource) Resolver(store runtimetypes.Store) localtools.GitIdentityResolver
type Person ¶
type Person struct {
Name string `json:"name"`
Email string `json:"email"`
Source string `json:"source"`
}
func ParsePerson ¶
type SigningCheck ¶
Click to show internal directories.
Click to hide internal directories.