How do I fix `fatal: the remote end hung up unexpectedly` while pushing from a Bitbucket pipeline to Platform.sh?
Adam Mahar
While pushing to Platform git repository from our Bitbucket runner, the pipeline fails with the following error: fatal: the remote end hung up unexpectedly .
How can I fix that?
0
Comments
Bitbucket pipelines support the
git clone --depthoption which can cause this error.This feature allows Bitbucket pipelines to fetch only a subset of your repository commit history as opposed to the full commit history. Unfortunately, when the pipeline pushes an incomplete history to your Platform repository, the Platform git server hangs and terminates transfer, causing your pipeline to fail with
fatal: the remote end hung up unexpectedly.Until we support shallow clones, the solution is to disable them. Setting
depth: fullin thebitbucket-pipelines.ymlas shown in the below YAML block.See the following documentation for further information:
And for Gitlab, you will need to set
git depthto0as described here.Please sign in to leave a comment.