How do I fix "fatal: the remote end hung up unexpectedly" while pushing from a GitLab pipeline to Platform.sh?

While pushing to Platform git repository from our GitLab runner, the pipeline fails with the following error: fatal: the remote end hung up unexpectedly.
How can I fix that?

0

Comments

3 comments
Date Votes
  • The GitLab runner 8.9 introduced a new feature called shallow cloning.

    This feature allows GitLab runner to fetch only a subset of your repository commit history as opposed to the whole commit history. Unfortunately, when the runner 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 “Git shallow clone” to 0 as shown in the below screenshot will resolve the issue.

    gitlab_pipelines_settings

    0
  • I was able to resolve the problem by following this.

    0
  • I also had to set the Git strategy for pipelines to git clone to make it work

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post