Bamboo git authentication fails from remote agent
Asked by John Buhl:

This is the error I get from a remote agent:  

```
com.atlassian.bamboo.repository.RepositoryException: java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command 'C:\Program Files (x86)\Git\bin\git.exe' ls-remote git://bitbucket.org/hiscoxpsg/sbdp-backbase.git failed with code 128. Working directory was [.]., stderr:[fatal: unable to connect to bitbucket.org:, bitbucket.org[0: 131.103.20.167]: errno=No error, bitbucket.org[1: 131.103.20.168]: errno=No error, ]	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:466)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:306)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:198)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectAllChangesSinceLastBuild(DefaultChangeDetectionManager.java:155)	at com.atlassian.bamboo.v2.trigger.ManualBuildDetectionAction.performDelayedChangeDetection(ManualBuildDetectionAction.java:172)	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl$2.getChainState(ChainExecutionManagerImpl.java:225)	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.tryStartChainState(ChainExecutionManagerImpl.java:278)	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.delayedStart(ChainExecutionManagerImpl.java:214)	at sun.reflect.GeneratedMethodAccessor2614.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:497)	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)	at com.sun.proxy.$Proxy146.delayedStart(Unknown Source)	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$2$1$1$1.run(PlanExecutionManagerImpl.java:430)	at com.atlassian.bamboo.util.CacheAwareness$2.call(CacheAwareness.java:83)	at com.atlassian.bamboo.util.CacheAwareness$2.call(CacheAwareness.java:79)	at com.atlassian.bamboo.util.CacheAwareness.whileReadingThroughCaches(CacheAwareness.java:101)	at com.atlassian.bamboo.util.CacheAwareness.whileReadingThroughCaches(CacheAwareness.java:78)	at com.atlassian.bamboo.util.CacheAwareness.whileReadingThroughCaches(CacheAwareness.java:118)	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$2$1$1.call(PlanExecutionManagerImpl.java:425)	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$2$1$1.call(PlanExecutionManagerImpl.java:417)	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.access$300(PlanExecutionManagerImpl.java:129)	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$2$1.run(PlanExecutionManagerImpl.java:411)	at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)	at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)	at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)	at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)	at java.lang.Thread.run(Thread.java:745)Caused by: java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command 'C:\Program Files (x86)\Git\bin\git.exe' ls-remote git://bitbucket.org/hiscoxpsg/sbdp-backbase.git failed with code 128. Working directory was [.]., stderr:[fatal: unable to connect to bitbucket.org:, bitbucket.org[0: 131.103.20.167]: errno=No error, bitbucket.org[1: 131.103.20.168]: errno=No error, ]	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)	at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:176)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.handleRepositoryExceptionForDeletedBranchWithRetry(DefaultChangeDetectionManager.java:603)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectionChangesWithRetry(DefaultChangeDetectionManager.java:557)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.access$400(DefaultChangeDetectionManager.java:76)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$3.call(DefaultChangeDetectionManager.java:414)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$3.call(DefaultChangeDetectionManager.java:358)	at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:357)	... 35 moreCaused by: com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command 'C:\Program Files (x86)\Git\bin\git.exe' ls-remote git://bitbucket.org/hiscoxpsg/sbdp-backbase.git failed with code 128. Working directory was [.]., stderr:[fatal: unable to connect to bitbucket.org:, bitbucket.org[0: 131.103.20.167]: errno=No error, bitbucket.org[1: 131.103.20.168]: errno=No error, ]	at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:344)	at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:216)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$5.call(DefaultChangeDetectionManager.java:608)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$5.call(DefaultChangeDetectionManager.java:604)	at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108)	... 45 moreCaused by: com.google.common.util.concurrent.UncheckedExecutionException: com.atlassian.bamboo.plugins.git.GitCommandException: command 'C:\Program Files (x86)\Git\bin\git.exe' ls-remote git://bitbucket.org/hiscoxpsg/sbdp-backbase.git failed with code 128. Working directory was [.]., stderr:[fatal: unable to connect to bitbucket.org:, bitbucket.org[0: 131.103.20.167]: errno=No error, bitbucket.org[1: 131.103.20.168]: errno=No error, ]	at com.atlassian.bamboo.collections.AlwaysInvalidatingCacheDecorator.getUnchecked(AlwaysInvalidatingCacheDecorator.java:139)	at com.atlassian.bamboo.util.CallableResultCache.call(CallableResultCache.java:136)	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.getRemoteRefs(NativeGitOperationHelper.java:503)	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.resolveBranch(NativeGitOperationHelper.java:438)	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.obtainLatestRevision(NativeGitOperationHelper.java:543)	at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:228)	... 49 moreCaused by: com.atlassian.bamboo.plugins.git.GitCommandException: command 'C:\Program Files (x86)\Git\bin\git.exe' ls-remote git://bitbucket.org/hiscoxpsg/sbdp-backbase.git failed with code 128. Working directory was [.]., stderr:[fatal: unable to connect to bitbucket.org:, bitbucket.org[0: 131.103.20.167]: errno=No error, bitbucket.org[1: 131.103.20.168]: errno=No error, ]	at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:550)	at com.atlassian.bamboo.plugins.git.GitCommandProcessor.getRemoteRefs(GitCommandProcessor.java:417)	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$1.call(NativeGitOperationHelper.java:491)	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$1.call(NativeGitOperationHelper.java:482)	at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:52)	at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:48)	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)	at com.google.common.cache.LocalCache.get(LocalCache.java:3965)	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)	at com.atlassian.bamboo.collections.AlwaysInvalidatingCacheDecorator.get(AlwaysInvalidatingCacheDecorator.java:81)	at com.atlassian.bamboo.collections.AlwaysInvalidatingCacheDecorator.getUnchecked(AlwaysInvalidatingCacheDecorator.java:135)	... 54 more
```


Answers:
author: John Buhl
body: Rafael,

I changed the prefix from git to ssh as you suggested. Now I am getting the following error.

com.atlassian.bamboo.repository.RepositoryException: java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command 'C:\\Program Files (x86)\\Git\\bin\\git.exe' ls-remote <ssh://8923a745-006a-49de-85c3-babff7a1dff9@127.0.0.1:64387/hiscoxpsg/sbdp-backbase.git> failed with code 128. Working directory was \[.\]., stderr:  
Error while opening SSH session  
stdout:  
\[Warning: Permanently added '\[127.0.0.1\]:64387' (RSA) to the list of known hosts., BAMBOO-SSH-PROXY: \[While connecting to \[HXP33709$@[bitbucket.org/131.103.20.168:22](http://bitbucket.org/131.103.20.168:22)\]: Error while opening SSH session: org.apache.sshd.common.RuntimeSshException: Failed to get the session.\], fatal: Could not read from remote repository., , Please make sure you have the correct access rights, and the repository exists.\]  
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:466)  
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:306)  
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:198)  
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectAllChangesSinceLastBuild(DefaultChangeDetectionManager.java:155)  
at com.atlassian.bamboo.v2.trigger.ManualBuildDetectionAction.performDelayedChangeDetection(ManualBuildDetectionAction.java:172)  
at com.atlassian.bamboo.chains.ChainExecutionManagerImpl$2.getChainState(ChainExecutionManagerImpl.java:225)  
at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.tryStartChainState(ChainExecutionManagerImpl.java:278)  
at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.delayedStart(ChainExecutionManagerImpl.java:214)  
at sun.reflect.GeneratedMethodAccessor2614.invoke(Unknown Source)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:497)  
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)  
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)  
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)  
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)  
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)  
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)  
at com.sun.proxy.$Proxy146.delayedStart(Unknown Source)  
at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$2$1$1$1.run(PlanExecutionManagerImpl.java:430)  
at com.atlassian.bamboo.util.CacheAwareness$2.call(CacheAwareness.java:83)  
at com.atlassian.bamboo.util.CacheAwareness$2.call(CacheAwareness.java:79)  
at com.atlassian.bamboo.util.CacheAwareness.whileReadingThroughCaches(CacheAwareness.java:101)  
at com.atlassian.bamboo.util.CacheAwareness.whileReadingThroughCaches(CacheAwareness.java:78)  
at com.atlassian.bamboo.util.CacheAwareness.whileReadingThroughCaches(CacheAwareness.java:118)  
at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$2$1$1.call(PlanExecutionManagerImpl.java:425)  
at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$2$1$1.call(PlanExecutionManagerImpl.java:417)  
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.access$300(PlanExecutionManagerImpl.java:129)  
at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$2$1.run(PlanExecutionManagerImpl.java:411)  
at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)  
at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)  
at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)  
at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command 'C:\\Program Files (x86)\\Git\\bin\\git.exe' ls-remote <ssh://8923a745-006a-49de-85c3-babff7a1dff9@127.0.0.1:64387/hiscoxpsg/sbdp-backbase.git> failed with code 128. Working directory was \[.\]., stderr:  
Error while opening SSH session  
stdout:  
\[Warning: Permanently added '\[127.0.0.1\]:64387' (RSA) to the list of known hosts., BAMBOO-SSH-PROXY: \[While connecting to \[HXP33709$@[bitbucket.org/131.103.20.168:22](http://bitbucket.org/131.103.20.168:22)\]: Error while opening SSH session: org.apache.sshd.common.RuntimeSshException: Failed to get the session.\], fatal: Could not read from remote repository., , Please make sure you have the correct access rights, and the repository exists.\]  
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)  
at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:176)  
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.handleRepositoryExceptionForDeletedBranchWithRetry(DefaultChangeDetectionManager.java:603)  
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectionChangesWithRetry(DefaultChangeDetectionManager.java:557)  
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.access$400(DefaultChangeDetectionManager.java:76)  
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$3.call(DefaultChangeDetectionManager.java:414)  
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$3.call(DefaultChangeDetectionManager.java:358)  
at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215)  
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:357)  
... 35 more  
Caused by: com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command 'C:\\Program Files (x86)\\Git\\bin\\git.exe' ls-remote <ssh://8923a745-006a-49de-85c3-babff7a1dff9@127.0.0.1:64387/hiscoxpsg/sbdp-backbase.git> failed with code 128. Working directory was \[.\]., stderr:  
Error while opening SSH session  
stdout:  
\[Warning: Permanently added '\[127.0.0.1\]:64387' (RSA) to the list of known hosts., BAMBOO-SSH-PROXY: \[While connecting to \[HXP33709$@[bitbucket.org/131.103.20.168:22](http://bitbucket.org/131.103.20.168:22)\]: Error while opening SSH session: org.apache.sshd.common.RuntimeSshException: Failed to get the session.\], fatal: Could not read from remote repository., , Please make sure you have the correct access rights, and the repository exists.\]  
at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:344)  
at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:216)  
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$5.call(DefaultChangeDetectionManager.java:608)  
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$5.call(DefaultChangeDetectionManager.java:604)  
at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108)  
... 45 more  
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: com.atlassian.bamboo.plugins.git.GitCommandException: command 'C:\\Program Files (x86)\\Git\\bin\\git.exe' ls-remote <ssh://8923a745-006a-49de-85c3-babff7a1dff9@127.0.0.1:64387/hiscoxpsg/sbdp-backbase.git> failed with code 128. Working directory was \[.\]., stderr:  
Error while opening SSH session  
stdout:  
\[Warning: Permanently added '\[127.0.0.1\]:64387' (RSA) to the list of known hosts., BAMBOO-SSH-PROXY: \[While connecting to \[HXP33709$@[bitbucket.org/131.103.20.168:22](http://bitbucket.org/131.103.20.168:22)\]: Error while opening SSH session: org.apache.sshd.common.RuntimeSshException: Failed to get the session.\], fatal: Could not read from remote repository., , Please make sure you have the correct access rights, and the repository exists.\]  
at com.atlassian.bamboo.collections.AlwaysInvalidatingCacheDecorator.getUnchecked(AlwaysInvalidatingCacheDecorator.java:139)  
at com.atlassian.bamboo.util.CallableResultCache.call(CallableResultCache.java:136)  
at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.getRemoteRefs(NativeGitOperationHelper.java:503)  
at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.resolveBranch(NativeGitOperationHelper.java:438)  
at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.obtainLatestRevision(NativeGitOperationHelper.java:543)  
at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:228)  
... 49 more  
Caused by: com.atlassian.bamboo.plugins.git.GitCommandException: command 'C:\\Program Files (x86)\\Git\\bin\\git.exe' ls-remote <ssh://8923a745-006a-49de-85c3-babff7a1dff9@127.0.0.1:64387/hiscoxpsg/sbdp-backbase.git> failed with code 128. Working directory was \[.\]., stderr:  
Error while opening SSH session  
stdout:  
\[Warning: Permanently added '\[127.0.0.1\]:64387' (RSA) to the list of known hosts., BAMBOO-SSH-PROXY: \[While connecting to \[HXP33709$@[bitbucket.org/131.103.20.168:22](http://bitbucket.org/131.103.20.168:22)\]: Error while opening SSH session: org.apache.sshd.common.RuntimeSshException: Failed to get the session.\], fatal: Could not read from remote repository., , Please make sure you have the correct access rights, and the repository exists.\]  
at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:550)  
at com.atlassian.bamboo.plugins.git.GitCommandProcessor.getRemoteRefs(GitCommandProcessor.java:417)  
at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$1.call(NativeGitOperationHelper.java:491)  
at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$1.call(NativeGitOperationHelper.java:482)  
at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:52)  
at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:48)  
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)  
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)  
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)  
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)  
at com.google.common.cache.LocalCache.get(LocalCache.java:3965)  
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)  
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)  
at com.atlassian.bamboo.collections.AlwaysInvalidatingCacheDecorator.get(AlwaysInvalidatingCacheDecorator.java:81)  
at com.atlassian.bamboo.collections.AlwaysInvalidatingCacheDecorator.getUnchecked(AlwaysInvalidatingCacheDecorator.java:135)  
... 54 more  
Caused by: java.lang.RuntimeException: org.apache.sshd.common.RuntimeSshException: Failed to get the session.  
at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:120)  
at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88)  
at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191)  
at com.atlassian.bamboo.plugins.ssh.SshProxyCommand$2.run(SshProxyCommand.java:144)  
Caused by: org.apache.sshd.common.RuntimeSshException: Failed to get the session.  
at org.apache.sshd.client.future.DefaultConnectFuture.getSession(DefaultConnectFuture.java:43)  
at com.atlassian.bamboo.plugins.ssh.SshProxyCommand.startRemoteConnection(SshProxyCommand.java:187)  
at com.atlassian.bamboo.plugins.ssh.SshProxyCommand.access$000(SshProxyCommand.java:31)  
at com.atlassian.bamboo.plugins.ssh.SshProxyCommand$2$1.call(SshProxyCommand.java:134)  
at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108)  
... 3 more  
Caused by: [java.io](http://java.io).IOException: The semaphore timeout period has expired.

at [sun.nio.ch](http://sun.nio.ch).Iocp.translateErrorToIOException(Iocp.java:309)  
at [sun.nio.ch](http://sun.nio.ch).Iocp.access$700(Iocp.java:46)  
at [sun.nio.ch](http://sun.nio.ch).Iocp$EventHandlerTask.run(Iocp.java:399)  
at java.lang.Thread.run(Thread.java:745)

comments: author: rsperafico
body: Hello John,Since you are running Bamboo Cloud, please raise a Support ticket (<https://support.atlassian.com>) we our Cloud support team will be able to assist you. Please, do not forget on mentioning this Answers so they have a history on the issue you were experiencing and what we have discussed.---Kind regards,Rafael P. SperaficoAtlassian Support


author: rsperafico
body: Hello John,

Thank you for your question.

Please, notice the URL to your repository should be HTTPS or SSH a not Git as mentioned in the log entry:

```
# currently running'C:\Program Files (x86)\Git\bin\git.exe' ls-remote git://bitbucket.org/hiscoxpsg/sbdp-backbase.git
```

```
# should be for HTTPS'C:\Program Files (x86)\Git\bin\git.exe' ls-remote https://bitbucket.org/hiscoxpsg/sbdp-backbase.git
```

```
# should be for SSH'C:\Program Files (x86)\Git\bin\git.exe' ls-remote git@bitbucket.org:hiscoxpsg/sbdp-backbase.git
```

Please, review repository settings in Bamboo under "*Bamboo administration \>\> Overview \>\> Build resources \>\> Linked repositories* " or "*Plan configuration \>\> Repositories*" tab.

Please, let us know what is the "*Repository type* " selected (*i.e: Bitbucket, Git*).

---

Kind regards,  
Rafael P. Sperafico  
Atlassian Support


Tags: cloud