Skip to content

Commit 8ebb7ae

Browse files
committed
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
1 parent 7ac2dbe commit 8ebb7ae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pre_commit/git.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def no_git_env(_env: Mapping[str, str] | None = None) -> dict[str, str]:
4343
'GIT_SSL_NO_VERIFY', 'GIT_CONFIG_COUNT',
4444
'GIT_HTTP_PROXY_AUTHMETHOD',
4545
'GIT_ALLOW_PROTOCOL',
46+
'GIT_ASKPASS',
4647
}
4748
}
4849

0 commit comments

Comments
 (0)