gitcredential

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLegacyCredential = errors.New("failed to reveal legacy Git credential")
)

Functions

func Configured

func Configured(ctx context.Context, gatewayClient *gclient.Client, credentialID string) (bool, error)

Configured reports whether the identified Git credential has a stored token.

func Delete

func Delete(ctx context.Context, gatewayClient *gclient.Client, credentialID string) error

Delete removes the stored token for the identified Git credential.

func NormalizeHost

func NormalizeHost(value string) (string, error)

NormalizeHost validates and canonicalizes a Git credential host.

func References

func References(ctx context.Context, storageClient kclient.Client, namespace, credentialID string) (v1.GitCredentialReferences, error)

References lists resources in the namespace that use the identified Git credential.

func Resolve

func Resolve(ctx context.Context, storageClient kclient.Client, gatewayClient *gclient.Client, namespace, credentialID, sourceURL string) (string, error)

Resolve validates a Git credential for a source URL and returns its stored token.

func ResolveOrReveal

func ResolveOrReveal(ctx context.Context, storageClient kclient.Client, gatewayClient *gclient.Client, namespace, credentialID, sourceURL, legacyCredentialContext, legacyToolName string) (string, error)

ResolveOrReveal resolves a shared Git credential or falls back to a legacy source-specific token.

func Store

func Store(ctx context.Context, gatewayClient *gclient.Client, credentialID, token string) error

Store saves the token for the identified Git credential.

Types

This section is empty.

Jump to

Keyboard shortcuts

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