We have developed a pre-repository hook plugin for Bitbucket v6.10.0.
The issue we are facing is when the plugin is enabled for a empty repository, and we are trying to push some files, we are getting below error in command line.
If the repo is not blank, then it works fine.
I am attaching the error screenshot and error log.
com.atlassian.bitbucket.commit.NoSuchCommitException: Commit '0000000000000000000000000000000000000000' does not exist in repository 'test-app2'.
at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.newNoSuchCommitException(GitCommandExitHandler.java:174)
at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.evaluateStdErr(GitCommandExitHandler.java:77)
at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:204)
at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:32)
at com.atlassian.bitbucket.scm.BaseCommand.callExitHandler(BaseCommand.java:214)
at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:348)
at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:312)
at com.atlassian.bitbucket.scm.BaseCommand.call(BaseCommand.java:144)
at com.atlassian.stash.internal.scm.git.command.SimpleGitCommand.configureAndCall(SimpleGitCommand.java:84)
at com.atlassian.stash.internal.scm.git.bulk.BulkContentCommand.diffTree(BulkContentCommand.java:160)
at com.atlassian.stash.internal.scm.git.bulk.BulkContentCommand.bulkContentIncremental(BulkContentCommand.java:129)
at com.atlassian.stash.internal.scm.git.bulk.BulkContentCommand.bulkContent(BulkContentCommand.java:82)
at com.atlassian.stash.internal.scm.git.bulk.BulkContentCommand.call(BulkContentCommand.java:70)
at com.atlassian.stash.internal.scm.git.bulk.BulkContentCommand.call(BulkContentCommand.java:40)
at com.abnamro.bitbucket.plugin.secretdetection.hook.SecretDetection.lambda$preUpdate$0(SecretDetection.java:78)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
at com.abnamro.bitbucket.plugin.secretdetection.hook.SecretDetection.preUpdate(SecretDetection.java:64)
at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.preUpdate(DefaultRepositoryHookService.java:770)
at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.lambda$preUpdate$4(DefaultRepositoryHookService.java:384)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.preUpdate(DefaultRepositoryHookService.java:363)
at com.atlassian.stash.internal.hook.DefaultBuiltInHookHandlerFactory.lambda$preReceive$0(DefaultBuiltInHookHandlerFactory.java:36)
at com.atlassian.stash.internal.scm.git.GitQuarantineHelper.lambda$null$1(GitQuarantineHelper.java:106)
at com.atlassian.stash.internal.hook.DefaultHookService.doHandleRequest(DefaultHookService.java:301)
at com.atlassian.stash.internal.hook.DefaultHookService.handleRequest(DefaultHookService.java:287)
at com.atlassian.stash.internal.hook.DefaultHookService.handleRawRequest(DefaultHookService.java:221)
at com.atlassian.stash.internal.hook.DefaultHookService$1.lambda$run$0(DefaultHookService.java:188)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.lang.Thread.run(Thread.java:748)
... 26 frames trimmed
We are also seeing the same... Running version 6.10.2.
T
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.