Skip to main content

git_token_from_env

Function git_token_from_env 

Source
pub fn git_token_from_env(config_host: Option<&str>) -> Option<GitToken>
Expand description

Read the git token from SLOPGUARD_GIT_TOKEN, bound to the host named by SLOPGUARD_GIT_TOKEN_HOST, else config_host ([git] token_host).

Returns None when the token or the host is missing: a token is never sent to a host the user did not name.