add GIT_ASKPASS as a passthrough env var

documented via man gitcredentials,  it is used to provide a script/input
for git to fetch creds in a no-tty usecase.
used among other things by jenkins to pass credentials down to git for
authentication.

https://github.com/jenkinsci/git-plugin/blob/1e3488a730a169778ba0863dd4edbb1dc29154a1/README.adoc#git-bindings
https://github.com/jenkinsci/git-plugin/blob/9429e7d05df3dbb4060ac6ab4da6538bb0eb50ba/src/main/java/jenkins/plugins/git/GitUsernamePasswordBinding.java#L130
This commit is contained in:
Matt Phillips
2022-10-27 15:32:38 -04:00
parent 7ac2dbeee0
commit 8ebb7ae2f5
+1
View File
@@ -43,6 +43,7 @@ def no_git_env(_env: Mapping[str, str] | None = None) -> dict[str, str]:
'GIT_SSL_NO_VERIFY', 'GIT_CONFIG_COUNT',
'GIT_HTTP_PROXY_AUTHMETHOD',
'GIT_ALLOW_PROTOCOL',
'GIT_ASKPASS',
}
}