Skip to main content

Module credentials

Module credentials 

Source
Expand description

Credential layer — Git-compatible credential filling/approval/rejection for library embedders.

This is the reusable core lifted from the CLI’s grit credential command (grit/src/commands/credential.rs). It exposes:

§Non-interactive by design

Unlike the CLI, HelperCredentialProvider never prompts on a TTY or via askpass. When the configured helpers cannot supply a usable username/password, fill returns a typed Error::Message (see NON_INTERACTIVE_MESSAGE) rather than blocking on /dev/tty. Interactive prompting is an explicitly opt-in concern an embedder can layer on top.

Structs§

Credential
A structured Git credential.
HelperCredentialProvider
Git-compatible CredentialProvider that runs the configured credential.helper programs.

Constants§

NON_INTERACTIVE_MESSAGE
Message returned (as Error::Message) when credentials are required but no configured helper could supply a complete username/password and interactive prompting is disallowed.

Traits§

CredentialProvider
The pluggable credential seam an embedder implements (or wraps).

Functions§

use_http_path
Whether credential.useHttpPath (optionally URL-scoped) is enabled.