Unable to clone the repository from Bitbucket Server after upgrading Git
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products will end after February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When attempting to close a repository from remote Bitbucket Server to local machine, the git clone
command fails with the following error:
Cloning into '***'...
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
Environment
- Windows
- Git installed via Chocolatey.
Diagnosis
The following error can be seen in the application log:
2023-09-27 00:00:00,000 DEBUG [ssh-scm-request-handler] <trimmed> SSH - git-upload-pack '/test/repo.git' c.a.b.scm.ssh.SshCommandExitHandler C:\Program Files\Git\cmd\git.exe -c uploadpack.allowFilter=true -c uploadpack.packobjectshook=E:/bitbucket-home/bin/git-scripts/pack-objects.sh upload-pack E:\bitbucket-home\shared\data\repositories\1: Threw the following exception:
com.atlassian.utils.process.ProcessException: Non-zero exit code: 128
at com.atlassian.bitbucket.internal.process.nu.NioNuProcessHandler.callExitHandler(NioNuProcessHandler.java:332)
at com.atlassian.bitbucket.internal.process.nu.NioNuProcessHandler.finish(NioNuProcessHandler.java:381)
at com.atlassian.bitbucket.internal.process.nu.NioNuProcessHandler.onExit(NioNuProcessHandler.java:136)
at com.zaxxer.nuprocess.windows.WindowsProcess.onExit(WindowsProcess.java:485)
at com.zaxxer.nuprocess.windows.ProcessCompletions.cleanupProcess(ProcessCompletions.java:365)
at com.zaxxer.nuprocess.windows.ProcessCompletions.process(ProcessCompletions.java:191)
at com.zaxxer.nuprocess.windows.ProcessCompletions.run(ProcessCompletions.java:123)
at com.zaxxer.nuprocess.windows.WindowsProcess.run(WindowsProcess.java:279)
at com.zaxxer.nuprocess.windows.WinProcessFactory.runProcess(WinProcessFactory.java:51)
at com.zaxxer.nuprocess.NuProcessBuilder.run(NuProcessBuilder.java:275)
at com.atlassian.bitbucket.internal.process.nu.NuNioProcessHelper.run(NuNioProcessHelper.java:76)
at com.atlassian.bitbucket.internal.process.NioCommand.call(NioCommand.java:46)
at com.atlassian.stash.internal.scm.git.protocol.ssh.GitSshScmRequest.handleRequest(GitSshScmRequest.java:133)
at com.atlassian.stash.internal.scm.git.protocol.ssh.SshUploadPack.handleRequest(SshUploadPack.java:87)
at com.atlassian.stash.internal.scm.ThrottledScmRequestFactory$ThrottledSshScmRequest.handleRequest(ThrottledScmRequestFactory.java:150)
at com.atlassian.bitbucket.internal.ssh.scm.ScmRequestSshCommand.run(ScmRequestSshCommand.java:49)
at com.atlassian.bitbucket.internal.ssh.server.SshCommandAdapter$SshCommandRunnable.performAsRequest(SshCommandAdapter.java:363)
at com.atlassian.bitbucket.internal.ssh.server.SshCommandAdapter$SshCommandRunnable.access$1800(SshCommandAdapter.java:297)
at com.atlassian.bitbucket.internal.ssh.server.SshCommandAdapter$SshCommandRunnable$OperationRequestAdapter.withRequest(SshCommandAdapter.java:445)
at com.atlassian.bitbucket.internal.ssh.server.SshCommandAdapter$SshCommandRunnable$OperationRequestAdapter.withRequest(SshCommandAdapter.java:440)
at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:84)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
at com.atlassian.bitbucket.internal.ssh.server.SshCommandAdapter$SshCommandRunnable.run(SshCommandAdapter.java:311)
at com.atlassian.bitbucket.internal.ssh.utils.NamePreservingRunnable.run(NamePreservingRunnable.java:30)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.lang.Thread.run(Thread.java:750)
... 22 frames trimmed
Cause
This issue is caused by the Git Server that is being installed on the Windows machine.
Solution
- Stop Bitbucket service.
- Uninstall the current Git on the Bitbucket server.
- Follow the steps in Install or upgrade Git on Windows.
- Start Bitbucket service.