Homer
Homer

Reputation: 181

git error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 Proxy Error

I work with tortoise git for my actual project. Me and the other members have some trouble since last week with our repository (worked perfect before).

When I want to push/pull/clone (HTTPS), I get the following error:

fatal: The remote end hung up unexpectedly error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 Proxy Error

Seems like something went wrong with the proxy server. I can use the repository as usual in the local network of my institute, but I get no access from home.

Does anyone has an idea how to fix this error? Unfortunately i can't find any other posts about this problem.

Greetings, Homer

Upvotes: 18

Views: 43364

Answers (5)

I had the same issue, I undid my last commit via git resest then again commit the changes. It resolved the problem.

Upvotes: 0

Rahimuddin
Rahimuddin

Reputation: 614

Updating http.postBuffer didn't work for me. In my case, I had 17 files to push. So I have pushed 17 files in chunks. Like 4-5 files together. It did solve my issue. Thanks @thesprinter for the hint.

Upvotes: 0

K1ltr0
K1ltr0

Reputation: 49

Try this:

  1. git remote remove origin
  2. git remote add origin URL

I don't understand why the error appears but luckily this works for me, i hope that can help others, regards.

Upvotes: 1

sourcecode
sourcecode

Reputation: 4601

The first step in troubleshooting this is to determine if you can import the entire repository without problems. If so, then any individual branch within the repository should not cause a problem. So rather than trying to "just clone a branch", can you do the following:

  1. Clone the source repository locally
  2. Create a new repository on GitHub
  3. Add the new repository as a remote for the local repository
  4. Push the contents of the local repository to the new GitHub repository

Upvotes: 0

TheSprinter
TheSprinter

Reputation: 1528

This kind of error happens mostly because of 2 reasons:

  1. pushing binary files/jar files to repo

  2. if the file(s) size is big.

Solution:
1. Use admin credential for pushing code change
2. execute the command git config --local http.postBuffer 157286400 before pushing.

Upvotes: 16

Related Questions