使用git error: RPC failed; result=22, HTTP code = 411

This error may occur when using git to submit relatively large files

 

error: RPC failed; result=22, HTTP code = 411
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

 

In this case, first change the transfer byte limit of git

 

git config http.postBuffer  524288000

 

Then there may be another error in the transmission at this time

 

error: RPC failed; result=22, HTTP code = 413
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

 

The two errors look similar, one is 411 and one is 413

 

The following error can be added to the key

First key-keygen generates a key: ssh-keygen -t rsa

 

The program will prompt you to enter the file name of the key, just press Enter.

You will then be asked to enter a passphrase, which you will need to provide when using the key in the future. You can enter it, or you can enter it directly without entering it (whether you enter it or not, you will be asked to confirm it once).

After confirmation, the program will generate a pair of keys and store them in the following folders:

 

C:\Users\Administrator[replace with your username]\.ssh

The key is divided into two files, a private key (id_rsa) and a public key (id_rsa.pub).

 

私钥保存在您的电脑上,公钥交项目负责人添加到服务器上。用户必须拥有与服务器公钥所配对的私钥,才能访问服务器上的代码库。

 

(在gitLAB页面最上边有ADD SSH KEY 连接)

 

之后:

git push ssh://192.168.64.250/eccp.git  branch

 

这就可以了

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326635116&siteId=291194637