Gitlab error “fatal: The remote end hung up unexpectedly” Again

Gitlab error “fatal: The remote end hung up unexpectedly” Again

Category : How-to

Get Social!

gitlabI previously wrote in this blog post about how to fix an error with Gitlab. The error was presented when using the  git push command with a remote repository that uses the Gitlabs HTTP protocol and not the SSH protocol.

The following error was presented in the Git client when using the git push command:

It seems that the issue is Nginx, Gitlab’s HTTP server, is not configured to receive large amounts of data. We need to specify the attribute client_max_body_size in Gitlab’s Nginx configuration file and specify the maximum amount of data Nginx will accept.

Open the configuration file and find the line location @gitlab.

Add the client_max_body_size attribute and specify the size value to use.

The M stands for megabyte – you can also use G for gigabytes.

If the size of your git push ever exceeds the above value, you will have to either increase the size further or reduce your git commit sizes.

Your completed /etc/nginx/sites-available/gitlab file should look like the below example which has a 20MB upload limit.

 


12 Comments

Sytse Sijbrandij

10-Mar-2014 at 8:11 am

Thanks for the article, we’ll change the default push size.

Sytse Sijbrandij

10-Mar-2014 at 8:13 am

Thanks for this article, we’ll increase the default in GitLab to 20MB in version 6.7

    james.coyle

    10-Mar-2014 at 12:54 pm

    That would be great – the current default is a little small for most projects today.

    Thanks!

Phil Ryan

30-May-2014 at 5:16 am

The default location for the config files is different with the Gitlab Omnibus deployments…. to

/var/opt/gitlab/nginx/etc

and the relevant gitlab config file is gitlab-http.conf.

Also, in passing, the default size has changed to 250MB (written as 250m in the config file).

Jitendra

22-Jul-2014 at 9:33 am

Hello
I am getting same error in windows env but not able to find
vi /etc/nginx/sites-available/gitlab
file to update size can please let me know
thanks
jitendra

    james.coyle

    22-Jul-2014 at 11:11 am

    What other files do you have in that path?

raghdajd

9-Mar-2018 at 11:05 am

The remote end hung up unexpectedly i have the same problem but when i run the jobs in gitlab what i should do?

    James Coyle

    9-Mar-2018 at 11:11 am

    What jobs?

      raghdajd

      9-Mar-2018 at 11:17 am

      Running with gitlab-runner 10.4.0 (857480b6)
      on shared-runner1 (116966aa)
      Using Shell executor…
      Running on gitlab…
      Skipping Git repository setup
      Skippping Git checkout
      Skipping Git submodules setup
      $ eval $(ssh-agent -s)
      Agent pid 9178
      $ ssh-add <(echo "$SSH_PRIVATE_KEY")
      Identity added: /dev/fd/63 (/dev/fd/63)
      $ cd ~
      $ /home/gitlab-runner/.composer/vendor/laravel/envoy/envoy run deploy
      [[email protected]]: Cloning repository: releases_dir: repository: new_release_dir: app_dir: release:
      [[email protected]]: Cloning into '/home/gitlab/releases/20180309103049'…
      [[email protected]]: ssh: connect to host 10.10.10.176 port 22: Connection timed out
      [[email protected]]: fatal: The remote end hung up unexpectedly
      [✗] This task did not complete successfully on one of your servers.
      ERROR: Job failed: exit status 1
      when i execute my project manuel

        James Coyle

        9-Mar-2018 at 11:19 am

        This is the part that you need to focus on:
        ssh: connect to host 10.10.10.176 port 22: Connection timed out

        Your client can’t reach the server on that IP and port.

          raghdajd

          9-Mar-2018 at 11:22 am

          is not about the domain name? because i don’t have it

          raghdajd

          12-Mar-2018 at 11:17 am

          what is the solution to correct it ? and thanks for helping me

Leave a Reply

Visit our advertisers

Search

Visit our advertisers