Skip to main content

Module git_credentials

Module git_credentials 

Source
Expand description

Credential handling for the git backup remote.

Policy (backup redesign §3.7): tokens must never live in URLs on disk (.git/config, SQLite settings). Credentials embedded in a remote URL are saved in owner-only local credential files and injected into git through a noninteractive helper that reads credentials from environment variables.

Structs§

RemoteCredential

Functions§

background_access_enabled
Debug binaries are ad-hoc signed on macOS. Their code signature changes on every rebuild, so background reads can repeatedly trigger a Keychain ACL prompt. Keep legacy Keychain migration off in development unless explicitly opted in. Local credential files and gh authentication do not need this opt-in.
credential_env_for_url
Environment to inject into a git subprocess so it can authenticate against url without credentials on disk. Empty when not applicable: non-http(s) URL, URL still carrying embedded userinfo (git uses it directly), or no stored credential for the host.
delete_credential
https_host
Host (including port, if any) of an http(s) URL with userinfo stripped. Used as the keychain account key.
install_git2_credentials
Attach a credentials callback to libgit2 network operations against url.
load_credential
split_credentials_from_url
Split userinfo credentials out of an http(s) URL.
store_credential