Skip to main content

askpass_program

Function askpass_program 

Source
pub fn askpass_program(env: &Environment, config: &ConfigSet) -> Option<PathBuf>
Expand description

The askpass program Git would run to ask for a missing username or password.

The first of these that is set wins: the GIT_ASKPASS environment variable, the core.askPass config value (with ~/ expanded), then the SSH_ASKPASS environment variable. As in Git, a source that is set to an empty value stops the search and disables askpass.

§Parameters

  • env — the environment to read GIT_ASKPASS / SSH_ASKPASS (and HOME for ~/) from; pass Environment::empty to consult config only.
  • config — merged config holding core.askPass.

§Returns

The program to pass to HelperCredentialProvider::with_askpass, or None when askpass is not configured.