问题
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
回答1:
This kind of error happens mostly because of 2 reasons:
pushing binary files/jar files to repo
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.
回答2:
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:
- Clone the source repository locally
- Create a new repository on GitHub
- Add the new repository as a remote for the local repository
- Push the contents of the local repository to the new GitHub repository
回答3:
Try this:
- git remote remove origin
- 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.
来源:https://stackoverflow.com/questions/50878840/git-error-rpc-failed-http-502-curl-22-the-requested-url-returned-error-502-pr