During running a Bamboo build - getting an error to access Stash Repo - Repository Exception - I need a solution for this issue - Very urgent ..Thanks
Asked by Manoj Shetty:

System Error Details {#toc-hId-1898569338}
==========================================

*[Build Employee_Test_Demo10 - Employee_Test_Demo10_Build_Plan 16](http://172.27.56.81:8085/browse/ETDTEN-ETDTENBP-16) :* Errors getting changes for ETDTEN-ETDTENBP-16   
(java.lang.RuntimeException : com.atlassian.bamboo.repository.RepositoryException: Runtime exception.)  

```
java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Runtime exception.	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.collectionChangesWithRetry(DefaultChangeDetectionManager.java:470)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:331)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:259)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:161)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectAllChangesSinceLastBuild(DefaultChangeDetectionManager.java:127)	at com.atlassian.bamboo.v2.trigger.ManualBuildDetectionAction.performDelayedChangeDetection(ManualBuildDetectionAction.java:166)	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl$2.getChainState(ChainExecutionManagerImpl.java:203)	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.tryStartChainState(ChainExecutionManagerImpl.java:256)	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.delayedStart(ChainExecutionManagerImpl.java:193)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:601)	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 $Proxy96.delayedStart(Unknown Source)	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.call(PlanExecutionManagerImpl.java:370)	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.call(PlanExecutionManagerImpl.java:366)	at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:312)	at com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl.lock(PlanExecutionLockServiceImpl.java:78)	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.doWithProcessLock(PlanExecutionManagerImpl.java:704)	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.access$200(PlanExecutionManagerImpl.java:122)	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1.run(PlanExecutionManagerImpl.java:365)	at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52)	at java.lang.Thread.run(Thread.java:722)Caused by: com.atlassian.bamboo.repository.RepositoryException: Runtime exception.	at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:281)	at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:182)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:474)	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:471)	at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108)	... 32 moreCaused by: com.google.common.util.concurrent.UncheckedExecutionException: com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/bin/git ls-remote http://manojshe:********@172.27.56.81:7990/scm/etdten/employee_test_demo10.git failed with code 128. Working directory was [.]., stderr:[fatal: remote error: CAPTCHA required, Your Stash account has been marked as requiring a CAPTCHA to be solved before, you may login again. This is typically caused by too many attempts to login, with an incorrect password. The required CAPTCHA prevents your SCM client from, accessing Stash until it is solved, even if you enter your password correctly., , If you are currently logged in to Stash via a browser you may need to logout, and then log back in in order to clear the CAPTCHA., , Visit Stash at http://172.27.56.81:7990 for more details.]	at com.google.common.cache.AbstractCache.getUnchecked(AbstractCache.java:51)	at com.atlassian.bamboo.plugins.git.CallableResultCache.call(CallableResultCache.java:82)	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.getRemoteRefs(NativeGitOperationHelper.java:485)	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.resolveBranch(NativeGitOperationHelper.java:420)	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.obtainLatestRevision(NativeGitOperationHelper.java:518)	at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:194)	... 36 moreCaused by: com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/bin/git ls-remote http://manojshe:********@172.27.56.81:7990/scm/etdten/employee_test_demo10.git failed with code 128. Working directory was [.]., stderr:[fatal: remote error: CAPTCHA required, Your Stash account has been marked as requiring a CAPTCHA to be solved before, you may login again. This is typically caused by too many attempts to login, with an incorrect password. The required CAPTCHA prevents your SCM client from, accessing Stash until it is solved, even if you enter your password correctly., , If you are currently logged in to Stash via a browser you may need to logout, and then log back in in order to clear the CAPTCHA., , Visit Stash at http://172.27.56.81:7990 for more details.]	at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:431)	at com.atlassian.bamboo.plugins.git.GitCommandProcessor.getRemoteRefs(GitCommandProcessor.java:351)	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$1.call(NativeGitOperationHelper.java:473)	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$1.call(NativeGitOperationHelper.java:464)	at com.atlassian.bamboo.plugins.git.CallableResultCache$1.load(CallableResultCache.java:29)	at com.atlassian.bamboo.plugins.git.CallableResultCache$1.load(CallableResultCache.java:25)	at com.google.common.cache.CustomConcurrentHashMap$ComputingValueReference.compute(CustomConcurrentHashMap.java:3426)	at com.google.common.cache.CustomConcurrentHashMap$Segment.compute(CustomConcurrentHashMap.java:2322)	at com.google.common.cache.CustomConcurrentHashMap$Segment.getOrCompute(CustomConcurrentHashMap.java:2291)	at com.google.common.cache.CustomConcurrentHashMap.getOrCompute(CustomConcurrentHashMap.java:3802)	at com.google.common.cache.ComputingCache.get(ComputingCache.java:46)	at com.google.common.cache.AbstractCache.getUnchecked(AbstractCache.java:49)	... 41 more
```


Answers:
author: Kiodex
body: I have encountered this issue recently in our environment and it turned out that bamboo's git handler has some bug while interpreting the special characters, so if you password has some special character the checkout task fails with the CAPTCHA error.

<https://jira.atlassian.com/browse/BAM-13158>

<https://jira.atlassian.com/browse/BAM-12553>

Hope this helps.

--Chetan


author: calo
body: I found there are something wrong with your code 128.

I think you use a tool for [creating code 128](http://www.onbarcode.com/products/java_barcode/barcodes/code_128.html)

And you can find many tutorials about [how build code 128 in java](http://www.barcodelib.com/java_barcode/main.html) on google.

Good luck. Hope the mistakes will be solved soon.


author: Michael Heemskerk
body: Here's a screenshot: ![](https://d2oawfjgoy88bd.cloudfront.net/50cf9a78e4b05c01ee92f282/50cf9a8fe4b05c01ee92f28d/533ad1bc38d38774e04baa3a.png?Expires=1396450117&Signature=BqvNW3AGhJ8Q~hDSkhJj69coPJyFIuiXCiduNcj~bGydRMiyS17tna50TeK9Nf7B3MLEUD600ZKnpIz54UWOZrIwMthYVG7Zc6Auka1vaLidmqtpTJ-IpSi-XFOWTn7IE2IwKnHpT7QIoqh~ZQywxe9UyCIG7n0Um6J0QGWsyrofSq-eVUtwshCkULtrVzMAmFAfWfDdWH6F5pYFhK0uN~qRUXtAyixyYlliVwmczLWOFZqwhsgkjIqfsO0PEiCcr6w1XBymRvzfe~seYpbzzeT~F6~jxagDTSqolzPevfBA22LTEHfXMlcnw0~tx9QHcyKP14xvDvIsp8lyr3W8IQ__&Key-Pair-Id=APKAJHEJJBIZWFB73RSA)


author: Manoj Shetty
body: Can you please tell where is the Option Clear Captcha? I cannot find the option or checkbox ?

thanks


author: Manoj Shetty
body: I also trying this solution

[](https://jira.atlassian.com/browse/STASH-3001)<https://jira.atlassian.com/browse/STASH-3001>

In order to disable CAPTCHA as part of the authentication you have to set the \<tt\>feature.auth.captcha\</tt\> property to\<tt\>false\</tt\> in the \<tt\>stash-config.properties\</tt\> file in your Stash home directory.

But this is not working for some reason.

Thanks

comments: author: Michael Heemskerk
body: You'll have to restart Stash after updating stash-config.properties for it to pick up the updated configuration.


author: Manoj Shetty
body: Thanks Michael

I will check the first solution and let you know


author: Michael Heemskerk
body: Hi Manoj,

As a Stash administrator, go to Admin \> Users and look up the user that's being used by Bamboo. Select "Clear CAPTCHA" to clear the CAPTCHA for that user.

Alternatively, you could generate an SSH key pair, configure Bamboo to use it and upload the public key to Stash as an access key for the repository (repository \> Settings \> Access Keys)

Hope this helps,

Michael


author: Manoj Shetty
body: Hi All,

Can I change the User table - fields for Stash App ? change the attempts field to zero and make Captcha as not required?

I need this on urgent basis ?

Thanks


Tags: bitbucket-server