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

ⅰ亾dé卋堺 提交于 2020-08-07 06:38:35

问题


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:

  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.




回答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:

  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



回答3:


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.



来源:https://stackoverflow.com/questions/50878840/git-error-rpc-failed-http-502-curl-22-the-requested-url-returned-error-502-pr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!