Cannot add Git repository in Fisheye

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Fisheye fails to add Git repository, either existing or newly created. The following shows up on your logfiles:

2014-01-16 14:49:31,945 ERROR [qtp27740446-254 ] fisheye RepositoryAdminRpcServiceImpl-generateMsgAndLogRepoActionFailure - Failed to enable or start new repository <repo-name>: Problem loading repository '<repo-name>'
 - Unable to get git version.
com.atlassian.fisheye.spi.admin.services.RepositoryConfigException: Problem loading repository '<repo-name>' - Unable to get git version.
        at com.atlassian.fisheye.spi.admin.impl.DefaultRepositoryAdminService.start(DefaultRepositoryAdminService.java:1194)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at com.cenqua.crucible.hibernate.WithSessionAspect.doCloseSession(WithSessionAspect.java:37)
        at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at com.sun.proxy.$Proxy43.start(Unknown Source)
        at com.atlassian.fecru.gwt.admin.server.RepositoryAdminRpcServiceImpl.createRepository(RepositoryAdminRpcServiceImpl.java:555)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at com.atlassian.fecru.gwt.admin.server.AdminSecurityAspect.doCloseSession(AdminSecurityAspect.java:35)
        at sun.reflect.GeneratedMethodAccessor187.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
     
...
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:368)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
        at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Unknown Source)
Caused by: com.cenqua.fisheye.config.ConfigException: Unable to get git version
        at com.atlassian.fisheye.git.client.GitContext.determineGitVersion(GitContext.java:95)
        at com.atlassian.fisheye.git.client.GitContext.determineGitVersion(GitContext.java:72)
        at com.atlassian.fisheye.git.GitRepositoryEngine.ensureCorrectScmVersion(GitRepositoryEngine.java:45)
        at com.cenqua.fisheye.rep.BaseRepositoryEngine.doStart(BaseRepositoryEngine.java:56)
        at com.cenqua.fisheye.rep.RepositoryEngine.start(RepositoryEngine.java:199)
        at com.cenqua.fisheye.rep.RepositoryHandle.run(RepositoryHandle.java:400)
        at com.cenqua.fisheye.config.DefaultRepositoryManager.runRepository(DefaultRepositoryManager.java:362)
        at com.atlassian.fisheye.spi.admin.impl.DefaultRepositoryAdminService.start(DefaultRepositoryAdminService.java:1192)
        ... 159 more
Caused by: com.atlassian.utils.process.ProcessNotStartedException: git could not be started
        at com.atlassian.utils.process.ExternalProcessImpl.start(ExternalProcessImpl.java:256)
        at com.atlassian.utils.process.ExternalProcessImpl.execute(ExternalProcessImpl.java:377)
        at com.atlassian.fisheye.git.client.GitContext.determineGitVersion(GitContext.java:86)
        ... 166 more
Caused by: java.io.IOException: Cannot run program "git": CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(Unknown Source)
        at com.atlassian.utils.process.ExternalProcessImpl.createDefaultProcess(ExternalProcessImpl.java:196)
        at com.atlassian.utils.process.ExternalProcessImpl.createProcess(ExternalProcessImpl.java:204)
        at com.atlassian.utils.process.ExternalProcessImpl.start(ExternalProcessImpl.java:253)
        ... 168 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        ... 172 more

Cause

  • you have no Git client installed 
  • or it is not properly available on PATH.

Diagnosis

  1. Launch command line executing cmd.exe in Start > Run
  2. Enter the command git to check if Git is installed and is available on PATH.
  3. Try and run git.exe as of the previous point. If it fails, check your PATH environment variable

If it turns out that you have no Git client installed (as of point 2 above), then install a supported Git client as of the supported platforms documentation. If that is not the case, proceed to the resolution below.

Resolution

Check in your PATH variable for your Git installation:

  • It likely will include <GIT-INSTALL>\cmd but not <GIT-INSTALL>\bin
  • The former will contain git.cmd to get the command git working, however Fisheye expects git.exe to be present on the PATH. 
  • So the solution is to add the <GIT-INSTALL>\bin folder to your current PATH definition.

Last modified on Sep 8, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.