From 7ee778ad59184c9705bed6e9903b1864a845e1f6 Mon Sep 17 00:00:00 2001 From: Matt Phillips Date: Thu, 27 Oct 2022 15:32:38 -0400 Subject: [PATCH] add some allowed GIT_ env vars ENV_ASKPASS/USER/PASS are documented via man gitcredentials, and are 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 --- pre_commit/git.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pre_commit/git.py b/pre_commit/git.py index 40b12f01c..6ba28121f 100644 --- a/pre_commit/git.py +++ b/pre_commit/git.py @@ -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', 'GIT_USERNAME', 'GIT_PASSWORD', } }