Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GIT push, HTTP code = 502 error

Tags:

git

gitlab

My project size is 1,63 GB (Magento Project) I had followed this tutorial

when I do this command : git push -u origin master , it is starting to write objects and after that I getting this error in git console:

error: RPC failed, result=22, HTTP code = 502 fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly 

What should I do to make this work ?

The result of the git remote -v is : enter image description here

like image 806
Attila Naghi Avatar asked Jun 20 '14 08:06

Attila Naghi


People also ask

Can't connect to any repository 502 Bad gateway?

@Chester: 502 is "Bad gateway". It usually means that the web server (nginx, Apache...) in front of the actual service is telling you that that service is not running - not accepting requests. Usually it cannot start due to configuration error, wrong configuration, missing dependencies...

Why do I keep getting error 502 bad gateway?

A 502 bad gateway message indicates that one server got an invalid response from another. In essence, you've connected with some kind of interim device (like an edge server) that should fetch all of the bits you need to load the page. Something about that process went wrong, and the message indicates the problem.

How do I debug a 502 Proxy Error?

Clear Browser Cache If switching to a different browser solves the problem, your main browser may have cached outdated or corrupt files that are creating the 502 error. Attempting to open the website after removing these cached files may resolve the issue.


2 Answers

The remote end hangs up because the pack size you are trying to transmit exceeds the maximum HTTP post size. Try to limit this pack size with

git config --local http.postBuffer 157286400 

to 150MB.

like image 142
user1978011 Avatar answered Oct 03 '22 20:10

user1978011


I got this problem when I had proxy set, but actually did not need proxy.

To fix:

git config --global --unset http.proxy git config --global --unset https.proxy 
like image 27
Jaanus Avatar answered Oct 03 '22 20:10

Jaanus