Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the RPC failed problem from git push to remote server

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how to solve the RPC failed problem from git push to remote server". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn how to solve the RPC failed problem from git push to the remote server.

Git submitted an error report

Error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413fatal: the remote end hung up unexpectedlyfatal: the remote end hung up unexpectedlyEverything up-to-date

Solution

Solution 1: modify the local git postbuffer size

Git config-global http.postbuffer 524288000

Option 2: modify the project .git / config file by adding the following

[http] postBuffer = 524288000

Plan 3: increase Maximum attachment size (MB) and Maximum push size (MB) with the Account and limit of the management account in gitlab

Question Review 1. First look at the question thrown by git push error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413

The information that is valid for us is expected to be the status code 413. We can start with this status code.

The meaning of this status code is

413 Request Entity Too Large

The server refuses to resolve the current request because the physical data submitted by the request exceeds the range that the server is willing or able to resolve. In this case, the server can close the connection so that the client does not continue to send the request.

From the meaning of the status code, we can conclude that the uploaded code may be too large. So I asked my partner to take a look at the amount of code he uploaded. Boy, it has a total size of 450m.

2. Treatment plan

Plan 1: upload the code in batches, not at once

The partner did deal with the problem according to this plan, but he said that it was so troublesome that he could not upload it in batches every time in the future, so the efficiency of submitting the code was very low.

Option 2: increase the size of upload in http mode

This solution is to set up postbuffer at the beginning, but the problem is that it doesn't matter what you use. Later, I wondered if it was due to the configuration of the domain name, so I used the intranet ip to go directly to the push code, and it turned out to be OK.

Then go to ping under the domain name of gitlab, and find that ip is not the intranet ip of gitlab, of course, what ping comes out may also be the external network ip, so I put the ip out of ping through Baidu to show that the ip is the local LAN.

Then it is natural to think about whether the gitlab of the project is configured with an agent, and then ask the former colleague who picked up the gitlab. Sure enough, he built this set of gitlab and used nginx as an agent, so he derived a third scheme.

Option 3: modify the nginx configuration

Add client_max_body_size to the server node of http, as follows

Http: {server: {client_max_body_size: 200m;}}

Scenario 4: submit the code with ssh

At this point, I believe you have a deeper understanding of "how to solve the RPC failed problem from git push to the remote server". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report