Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[JENKINS-35959] Don't prompt interactively for credentials
Use git 2.3+ GIT_TERMINAL_PROMPT=0 to prevent git auth prompt. Older git versions may continue to prompt for interactive credentials, since they don't recognize the GIT_TERMINAL_PROMPT variable. Command line git prompts for authentication if connected to a terminal. Jenkins agents running as a service are not connected to a terminal. Jenkins agents running from a desktop (Windows or interactive docker) may run a git process which prompts for authentication. This setting should reduce the ways that a newer command line git installation can block. Support for GIT_TERMINAL_PROMPT was first added in git 2.3. Don't prompt from Git Credentials Manager (Windows). Refer to https://github.com/Microsoft/Git-Credential-Manager-for-Windows/blob/105a222711afd00166182b0d95776572a40f57af/Cli-Shared/Program.cs#L62 User can return to old behavior with the CliGitAPIImpl property org.jenkinsci.plugins.gitclient.CliGitAPIImpl.promptForAuthentication=true
- Loading branch information