# ConfigurationCache and InvalidUserCodeException with git

**URL:** <https://discuss.gradle.org/t/configurationcache-and-invalidusercodeexception-with-git/46665>\
**Category:** Help/Discuss\
**Created:** [October 2, 2023, 10:50am UTC](https://discuss.gradle.org/t/configurationcache-and-invalidusercodeexception-with-git/46665 "2023-10-02T10:50:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bric3](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/bric3/32/9458_2.png) [@bric3](https://discuss.gradle.org/u/bric3)\
**Post date:** [October 2, 2023, 10:50am UTC](https://discuss.gradle.org/t/configurationcache-and-invalidusercodeexception-with-git/46665/1 "2023-10-02T10:50:59Z")

</div>

I’m seeing the following issues with git versioning plugins

- pl.allegro.tech.build:axion-release-plugin:1.15.4

I looked at the various other plugins but they don’t seem to work with configuration cache. Am I missing something here ?  
Thanks in advance for suggestions.

```gradle
org.gradle.api.InvalidUserCodeException: Starting an external process '/opt/homebrew/bin/git --version' during configuration time is unsupported.
	at org.gradle.configurationcache.problems.DefaultProblemFactory$problem$1$build$diagnostics$1.get(DefaultProblemFactory.kt:86)
	at org.gradle.configurationcache.problems.DefaultProblemFactory$problem$1$build$diagnostics$1.get(DefaultProblemFactory.kt:86)
	at org.gradle.internal.problems.DefaultProblemDiagnosticsFactory$DefaultProblemStream.getImplicitThrowable(DefaultProblemDiagnosticsFactory.java:111)
	at org.gradle.internal.problems.DefaultProblemDiagnosticsFactory$DefaultProblemStream.forCurrentCaller(DefaultProblemDiagnosticsFactory.java:100)
	at org.gradle.configurationcache.problems.DefaultProblemFactory$problem$1.build(DefaultProblemFactory.kt:86)
	at org.gradle.configurationcache.initialization.DefaultConfigurationCacheProblemsListener.onExternalProcessStarted(ConfigurationCacheProblemsListener.kt:98)
	at org.gradle.configurationcache.InstrumentedInputAccessListener.externalProcessStarted(InstrumentedInputAccessListener.kt:111)
	at org.gradle.internal.classpath.Instrumented.externalProcessStarted(Instrumented.java:509)
	at org.gradle.internal.classpath.Instrumented.externalProcessStarted(Instrumented.java:517)
	at org.gradle.internal.classpath.Instrumented.start(Instrumented.java:371)
	at org.eclipse.jgit.util.FS.readPipe(FS.java:1383)
	at org.eclipse.jgit.util.FS.readPipe(FS.java:1345)
	at org.eclipse.jgit.util.FS.discoverGitSystemConfig(FS.java:1534)
	at org.eclipse.jgit.util.FS.getGitSystemConfig(FS.java:1631)
	at org.eclipse.jgit.util.SystemReader$Default.openSystemConfig(SystemReader.java:106)
	at org.eclipse.jgit.util.SystemReader.getSystemConfig(SystemReader.java:386)
	at org.eclipse.jgit.util.SystemReader.getUserConfig(SystemReader.java:334)
	at org.eclipse.jgit.internal.storage.file.FileRepository.<init>(FileRepository.java:162)
	at org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:625)
	at org.eclipse.jgit.api.Git.open(Git.java:93)
	at org.eclipse.jgit.api.Git.open(Git.java:73)
	at pl.allegro.tech.build.axion.release.infrastructure.git.GitRepository.<init>(GitRepository.java:70)
	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:263)
	at org.gradle.internal.classpath.intercept.CallInterceptorsSet$DecoratingCallSite.access$401(CallInterceptorsSet.java:132)
	at org.gradle.internal.classpath.intercept.CallInterceptorsSet$DecoratingCallSite$4.callOriginal(CallInterceptorsSet.java:184)
	at org.gradle.internal.classpath.intercept.CallInterceptorsSet$1.doIntercept(CallInterceptorsSet.java:56)
	at org.gradle.internal.classpath.intercept.CallInterceptorsSet$DecoratingCallSite.callConstructor(CallInterceptorsSet.java:181)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:277)
	at pl.allegro.tech.build.axion.release.infrastructure.di.ScmRepositoryFactory.create(ScmRepositoryFactory.groovy:23)
	at pl.allegro.tech.build.axion.release.infrastructure.di.ScmRepositoryFactory$create.call(Unknown Source)

```

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [October 2, 2023, 11:04am UTC](https://discuss.gradle.org/t/configurationcache-and-invalidusercodeexception-with-git/46665/2 "2023-10-02T11:04:23Z")

</div>

See [Using jgit with Gradle configuration cache](https://discuss.gradle.org/t/using-jgit-with-gradle-configuration-cache/45410) for the full story. 🙂
