Jobs Failing After Upgrading The Git Plugin

Article ID:214462938
1 minute readKnowledge base


Jobs using the Git Plugin fail with the following stack trace after the Git Plugin is upgraded:

FATAL: Null value not allowed as an environment variable: GIT_COMMIT
java.lang.IllegalArgumentException: Null value not allowed as an environment variable: GIT_COMMIT
at hudson.EnvVars.put(
at hudson.EnvVars.put(
at hudson.plugins.git.GitSCM.buildEnvVars(
at hudson.model.AbstractBuild.getEnvironment(
at hudson.maven.AbstractMavenBuild.getEnvironment(
at hudson.maven.MavenModuleSetBuild.getEnvironment(
at hudson.plugins.git.GitSCM.checkout(
at hudson.scm.SCM.checkout(
at hudson.model.AbstractProject.checkout(
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(
at jenkins.scm.SCMCheckoutStrategy.checkout(
at hudson.model.AbstractBuild$
at hudson.model.Run.execute(
at hudson.model.ResourceController.execute(

Also see JENKINS-27189


  • CloudBees Jenkins Enterprise


The fix for this issue is included in a release after v.2.4.0. At the time of this writing, v2.5.0-beta3 is the most current version of the Git Plugin that contains the fix. You can download the plugin releases after v.2.4.0 from here and install it manually via Manage Jenkins -> Manage Plugins -> Advanced Tab -> Upload Plugin.

Another option would be to Enable access to experimental plugin releases via Manage Jenkins -> Configure System -> Access to experimental plugin releases to see this version in the Update Center.