Jobs Failing After Upgrading The Git Plugin

Issue

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(EnvVars.java:356)
at hudson.EnvVars.put(EnvVars.java:74)
at hudson.plugins.git.GitSCM.buildEnvVars(GitSCM.java:1178)
at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:910)
at hudson.maven.AbstractMavenBuild.getEnvironment(AbstractMavenBuild.java:56)
at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:167)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1036)
at hudson.scm.SCM.checkout(SCM.java:488)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1257)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
at hudson.model.Run.execute(Run.java:1745)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)

Also see JENKINS-27189

Environment

  • CloudBees Jenkins Enterprise

Resolution

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 acess to experimental plugin releases via Manage Jenkins -> Configure System -> Access to experimental plugin releases to see this version in the Update Center.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.