Skip to main content

global_ssh_key_command

Function global_ssh_key_command 

Source
pub fn global_ssh_key_command(repo_root: &Path) -> Option<String>
Expand description

How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. The GIT_SSH_COMMAND a network command needs to use the configured key, or None when it must be left alone. Precedence, highest first - the configured key only fills a gap, it never overrides:

  1. GIT_SSH_COMMAND / GIT_SSH already in the environment,
  2. core.sshCommand in the effective git config (the repository’s own pin from “SSH key for this repository”, or a global one),
  3. the configured key (ssh -i "<key>" -o IdentitiesOnly=yes),
  4. nothing: ssh’s own configuration and the ssh-agent.