com.atlassian.bamboo.repository.RepositoryException: java.lang.RuntimeException: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'https://bitbucket.org/witech2/wipod' on branch 'default'. Branch has probably been removed.

Atlassian JIRA | Jaime Silveira [Atlassian] | 1 year ago
  1. 0

    In some cases, some Bamboo builds have been failing because Bamboo is attempting to connected to the 'master' branch in some repository, but instead it looks for 'default'. When this branch doesn't exist, the build fails to run. The logs show the following errors: {noformat} com.atlassian.bamboo.repository.RepositoryException: java.lang.RuntimeException: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'https://bitbucket.org/witech2/wipod' on branch 'default'. Branch has probably been removed. at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:444) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:301) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:186) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildIfTriggered(DefaultChangeDetectionManager.java:124) at com.atlassian.bamboo.v2.trigger.ChangeDetectionListenerAction.testIfBuildShouldStart(ChangeDetectionListenerAction.java:112) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$4.call(PlanExecutionManagerImpl.java:526) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$4.call(PlanExecutionManagerImpl.java:510) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:312) at com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl.lock(PlanExecutionLockServiceImpl.java:85) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.doWithProcessLock(PlanExecutionManagerImpl.java:800) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.startConditionalBuild(PlanExecutionManagerImpl.java:509) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.start(PlanExecutionManagerImpl.java:582) ... Caused by: java.lang.RuntimeException: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'https://bitbucket.org/witech2/wipod' on branch 'default'. Branch has probably been removed. at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:132) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191) ... Caused by: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'https://bitbucket.org/witech2/wipod' on branch 'default'. Branch has probably been removed. at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.obtainLatestRevision(NativeGitOperationHelper.java:550) at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$2.call(NativeGitOperationHelper.java:561) at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$2.call(NativeGitOperationHelper.java:557) {noformat} Another behavior we could see in a case, when selecting the repository in the Linked Repositories page in Bamboo, right when it's select the 'Branch' is 'default' and it's immediately changed to 'master'. *Workaround* # Delete the repository and add it back

    Atlassian JIRA | 1 year ago | Jaime Silveira [Atlassian]
    com.atlassian.bamboo.repository.RepositoryException: java.lang.RuntimeException: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'https://bitbucket.org/witech2/wipod' on branch 'default'. Branch has probably been removed.
  2. 0

    The branch should be disabled: At the moment, nothing happens for HG and in Git the branch fails with {code} java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Cannot determine head revision of 'git@bitbucket.org:atlassian/confluence.git' on branch '4.1-stable'. at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:119) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:79) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:174) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectionChangesWithRetry(DefaultChangeDetectionManager.java:382) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuild(DefaultChangeDetectionManager.java:255) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:213) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:138) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildIfTriggered(DefaultChangeDetectionManager.java:117) at com.atlassian.bamboo.v2.trigger.ChangeDetectionListenerAction.process(ChangeDetectionListenerAction.java:95) at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.createChainState(ChainExecutionManagerImpl.java:245) at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.start(ChainExecutionManagerImpl.java:168) at sun.reflect.GeneratedMethodAccessor343.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy83.start(Unknown Source) at sun.reflect.GeneratedMethodAccessor343.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at $Proxy84.start(Unknown Source) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.startWithLockTaken(PlanExecutionManagerImpl.java:249) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.access$100(PlanExecutionManagerImpl.java:40) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1.call(PlanExecutionManagerImpl.java:236) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1.call(PlanExecutionManagerImpl.java:230) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:324) at com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl.lock(PlanExecutionLockServiceImpl.java:68) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.doWithProcessLock(PlanExecutionManagerImpl.java:360) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.start(PlanExecutionManagerImpl.java:229) at com.atlassian.bamboo.plan.NonBlockingPlanExecutionServiceImpl$1.call(NonBlockingPlanExecutionServiceImpl.java:70) at com.atlassian.bamboo.plan.NonBlockingPlanExecutionServiceImpl$1.call(NonBlockingPlanExecutionServiceImpl.java:61) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:50) at java.lang.Thread.run(Thread.java:680) Caused by: com.atlassian.bamboo.repository.RepositoryException: Cannot determine head revision of 'git@bitbucket.org:atlassian/confluence.git' on branch '4.1-stable'. at com.atlassian.bamboo.plugins.git.GitOperationHelper$3.doWithFetchConnection(GitOperationHelper.java:302) at com.atlassian.bamboo.plugins.git.GitOperationHelper$3.doWithFetchConnection(GitOperationHelper.java:295) at com.atlassian.bamboo.plugins.git.GitOperationHelper.withFetchConnection(GitOperationHelper.java:693) at com.atlassian.bamboo.plugins.git.GitOperationHelper.obtainLatestRevision(GitOperationHelper.java:294) at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:214) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:386) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:383) at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:100) ... 42 more {code}

    Atlassian JIRA | 5 years ago | Mark Chaimungkalanont
    java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Cannot determine head revision of 'git@bitbucket.org:atlassian/confluence.git' on branch '4.1-stable'.
  3. 0

    The branch should be disabled: At the moment, nothing happens for HG and in Git the branch fails with {code} java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Cannot determine head revision of 'git@bitbucket.org:atlassian/confluence.git' on branch '4.1-stable'. at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:119) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:79) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:174) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectionChangesWithRetry(DefaultChangeDetectionManager.java:382) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuild(DefaultChangeDetectionManager.java:255) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:213) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:138) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildIfTriggered(DefaultChangeDetectionManager.java:117) at com.atlassian.bamboo.v2.trigger.ChangeDetectionListenerAction.process(ChangeDetectionListenerAction.java:95) at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.createChainState(ChainExecutionManagerImpl.java:245) at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.start(ChainExecutionManagerImpl.java:168) at sun.reflect.GeneratedMethodAccessor343.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy83.start(Unknown Source) at sun.reflect.GeneratedMethodAccessor343.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at $Proxy84.start(Unknown Source) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.startWithLockTaken(PlanExecutionManagerImpl.java:249) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.access$100(PlanExecutionManagerImpl.java:40) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1.call(PlanExecutionManagerImpl.java:236) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1.call(PlanExecutionManagerImpl.java:230) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:324) at com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl.lock(PlanExecutionLockServiceImpl.java:68) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.doWithProcessLock(PlanExecutionManagerImpl.java:360) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.start(PlanExecutionManagerImpl.java:229) at com.atlassian.bamboo.plan.NonBlockingPlanExecutionServiceImpl$1.call(NonBlockingPlanExecutionServiceImpl.java:70) at com.atlassian.bamboo.plan.NonBlockingPlanExecutionServiceImpl$1.call(NonBlockingPlanExecutionServiceImpl.java:61) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:50) at java.lang.Thread.run(Thread.java:680) Caused by: com.atlassian.bamboo.repository.RepositoryException: Cannot determine head revision of 'git@bitbucket.org:atlassian/confluence.git' on branch '4.1-stable'. at com.atlassian.bamboo.plugins.git.GitOperationHelper$3.doWithFetchConnection(GitOperationHelper.java:302) at com.atlassian.bamboo.plugins.git.GitOperationHelper$3.doWithFetchConnection(GitOperationHelper.java:295) at com.atlassian.bamboo.plugins.git.GitOperationHelper.withFetchConnection(GitOperationHelper.java:693) at com.atlassian.bamboo.plugins.git.GitOperationHelper.obtainLatestRevision(GitOperationHelper.java:294) at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:214) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:386) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:383) at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:100) ... 42 more {code}

    Atlassian JIRA | 5 years ago | Mark Chaimungkalanont
    java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Cannot determine head revision of 'git@bitbucket.org:atlassian/confluence.git' on branch '4.1-stable'.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h3. Summary Bamboo Cloud shows "not valid: is this a git repository" system errors. It occurs when Bamboo runs the command {{/usr/bin/git ls-remote}} to check the remote Bitbucket repositories. {noformat} com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/bin/git ls-remote https://s********s:********@bitbucket.org/s********s/pjh-elect failed with code 128. Working directory was [.]., stderr: fatal: https://s********s:********@bitbucket.org/s********s/p*******/info/refs not valid: is this a git repository? at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:314) at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:237) .... Caused by: com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/bin/git ls-remote https://s********s:********@bitbucket.org/s********s/p****** failed with code 128. Working directory was [.]., stderr: fatal: https://s********s:********@bitbucket.org/s********s/p*******/info/refs not valid: is this a git repository? at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:587) at com.atlassian.bamboo.plugins.git.GitCommandProcessor.getRemoteRefs(GitCommandProcessor.java:430) at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$1.call(NativeGitOperationHelper.java:501) {noformat} The errors are intermittent and checking at a latter time will work again. h3. Environment * Bamboo * Bitbucket Cloud h3. Steps to reproduce: # Configure a "Bitbucket Cloud" repository under "Linked repositories" # Wait for at least 24 hours so Bamboo does multiple checks on the repositories. *Result:* The errors will appear of sporadic connection failures to Bitbucket on the section: /builds/admin/systemErrors.action h3. Workaround If the error is shown when running a build, try at a later time. Because the error is intermittent, if errors are found on the System Errors section, it can be discarded

    Atlassian JIRA | 11 months ago | Muhammad Fahd [Atlassian]
    com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/bin/git ls-remote https://s********s:********@bitbucket.org/s********s/pjh-elect failed with code 128. Working directory was [.]., stderr: fatal: https://s********s:********@bitbucket.org/s********s/p*******/info/refs not valid: is this a git repository?
  6. 0

    [BAM-7717] Support self signed SSL certificates when accessing Git repositories - Atlassian JIRA

    atlassian.com | 1 year ago
    com.atlassian.bamboo.repository.RepositoryException: https:

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.atlassian.bamboo.repository.RepositoryException

      java.lang.RuntimeException: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'https://bitbucket.org/witech2/wipod' on branch 'default'. Branch has probably been removed.

      at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal()
    2. com.atlassian.bamboo
      PlanExecutionManagerImpl$4.call
      1. com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:444)
      2. com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:301)
      3. com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:186)
      4. com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildIfTriggered(DefaultChangeDetectionManager.java:124)
      5. com.atlassian.bamboo.v2.trigger.ChangeDetectionListenerAction.testIfBuildShouldStart(ChangeDetectionListenerAction.java:112)
      6. com.atlassian.bamboo.plan.PlanExecutionManagerImpl$4.call(PlanExecutionManagerImpl.java:526)
      7. com.atlassian.bamboo.plan.PlanExecutionManagerImpl$4.call(PlanExecutionManagerImpl.java:510)
      7 frames
    3. com.atlassian.util
      ManagedLocks$ManagedLockImpl.withLock
      1. com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:312)
      1 frame
    4. com.atlassian.bamboo
      PlanExecutionManagerImpl.start
      1. com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl.lock(PlanExecutionLockServiceImpl.java:85)
      2. com.atlassian.bamboo.plan.PlanExecutionManagerImpl.doWithProcessLock(PlanExecutionManagerImpl.java:800)
      3. com.atlassian.bamboo.plan.PlanExecutionManagerImpl.startConditionalBuild(PlanExecutionManagerImpl.java:509)
      4. com.atlassian.bamboo.plan.PlanExecutionManagerImpl.start(PlanExecutionManagerImpl.java:582)
      4 frames