Gitlab-error: RPC failed; result=22, HTTP code = 500 settlement

This article gives you a comprehensive understanding of Java object serialization and deserialization>>>

In the process of operating gitlab to push and pull the daily code, I suddenly encountered an exception as described in the title. This blog records the solution to this problem

Scene reappearance

Code push operation on gitlab private warehouse generates the following exception information:

Counting objects: 875, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (523/523), done.
Writing objects: 100% (875/875), 42.94 MiB | 9.72 MiB/s, done.
Total 875 (delta 206), reused 2 (delta 0)
error: RPC failed; result=22, HTTP code = 500
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

Gitlab’s official feedback on this issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/12629

After checking the official issue, we can find that the official solutions to this problem are basically the following two solutions:

change CentOS operating system to Ubuntu

change nginx engine to Tomcat

Both schemes are expensive and unacceptable

Causes of problems

Because gitlab itself encapsulates tools such as nginx and redis, and the configuration of these tools is also solved. Therefore, in the process of pushing code, if the volume of one-time commit is too large and exceeds the limit value of Max package, the above exception may occur

It’s definitely not nginx or the operating system itself

But changing gitlab configuration is a very troublesome thing, so here’s another way of thinking: we don’t rely on HTTP protocol to upload, we can bypass this problem by Using SSH protocol instead

New solutions

New solution: change the submission method to SSH

Specific operation steps:

submit the public key to gitlab’s account

for the generation and submission of SSH key, please refer to my blog: GitHub – SSH login without password

change project remote address

use the command git remote – V

under the project path. If the code is uploaded in the form of HTTP/HTTPS, the address format is similar to: gitlab http:// ${your domain name}/liumapp/${your project name}. Git (fetch)

what we need to do is change it to upload in the form of SSH, To change the address to something like: gitlab [email protected] : liumapp/${your project name}. Git

operation command git remote set URL gitlab git @ ${your domain name}: liumapp/${your project name}. Git

by the way, please replace the above liumapp with your own gitlab account name

Using SSH to push code, GIT to push, problem solving

Similar Posts: