1. 程式人生 > >Gitlab RPC failed; result=22, HTTP code = 413 解決方法

Gitlab RPC failed; result=22, HTTP code = 413 解決方法

說明:

最近專案組有同事遇見了一個gitlab push 的問題

其報錯如下:

        Counting objects: 21230, done.
        Delta compression using up to 3 threads.
        Compressing objects: 100% (20814/20814), done.
        Writing objects: 100% (21230/21230), 632.97 MiB | 9.89 MiB/s, done.
        Total 21230 (delta 9495), reused 0 (delta 0)
        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

wKioL1acuSzhiXOXAAAxgiiSla8393.png

經過了解後,root case 為 push 過大,超過單個檔案上傳預設限制:

  1. gitlab 預設commit 檔案為5M

  2. gitlab預設上傳檔案最大10M

  3. nginx.conf 預設配置無lient_max_body_size

解決方式:

一、服務端配置修改(修改配置的時候請一定要備份)

1.修改 gitlab/config/gitlab.yml 配置檔案187行:

        [[email protected] ~]$ vi  gitlab/config/gitlab.yml

wKiom1acuwGQFhz5AAAq4z3e0jw770.png

2.修改 gitlab/app/models/note.rb 配置檔案39行:

        [[email protected]
 ~]$ vi gitlab/app/models/note.rb

wKiom1acu9Pyjlq7AAA9GOwP1pU755.png

3.修改 /usr/local/nginx/conf/nginx.conf 配置檔案,在http模組內新增一行配置:

        [[email protected] ~]# vi /usr/local/nginx/conf/nginx.conf

wKioL1acvPDBkD66AABHjc5nU84277.png

4.重啟gitlab服務 和 nginx 服務

        [[email protected] ~]# /etc/init.d/gitlab restart
        [[email protected] ~]# /etc/init.d/nginx restart

二、客戶端配置

windows / 外掛下:

編輯 git全域性配置,新增配置:

    [http]
    receivepack = true
    postBuffer = 524288000

 wKioL1acwPPyy_QCAADGnUaxae0539.png

linux / 命令列 下:git config http.postBuffer 524288000

然後就可以推送大檔案了(60M) ,但是不建議開啟這麼大的檔案傳輸限制,其中原因想必大家懂得 。

wKioL1acv13Qek0sAADBe__0W3g497.png

關於gitlab ,請大家多多交流,共同進步哦 ~~~

相關推薦

Gitlab RPC failed; result=22, HTTP code = 413 解決方法

說明:最近專案組有同事遇見了一個gitlab push 的問題其報錯如下:        Counting objects: 21230, done.        Delta compression using up to 3 threads.        Compres

gitlab 使用中錯誤:error: RPC failed; result=22 HTTP code = 413

1.   錯誤訊息: error: RPC failed; result=22 HTTP code = 413  .... fatal: The remote end hung up unexpectedly. 2.   error: 無法推送一些引用到 'https:.

gitlab報錯 fatal index-pack failed error RPC failed result

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

gitlab報錯 fatal index-pack failed error RPC failed result

也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!                gitlab報錯 "fatal: index-pack failed error: RPC failed; result=18, HTTP code = 200

git clone的時候報error: RPC failed; result=18錯誤

因業務需求,需要把內網gitlab倉庫的地址對外網訪問,在gitlab前端配置了一個nginx代理伺服器,來實現需求,可以在git clone的時候報error: RPC failed錯誤 [[email protected]Server_yd]# git clone http://use

git push error HTTP code = 413

p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff } span.s1 { } error: RPC failed; HTTP 413 curl 22 Th

git error: RPC failed; curl 56 GnuTLS recv error 解決方案

// git 報錯情況: error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was non-properly terminated.    解決方案: Note: This solut

IIS部署時未能加載程序集"System.Web.Http.WebHost"解決方法

dll 部署 地址 行程 加載 img iis web mvc 問題如下 服務器沒有安裝MVC,下載以下dll覆蓋到bin目錄下,即可免安裝運行程序。 下載地址:https://pan.baidu.com/s/1mhCo5mSIIS部署時未能加載程序集"Syst

在nginx中遇到 [alert] kill(25903, 1) failed (3: No such process)錯誤解決方法

當nginx出現如下類似錯誤的時候,不要驚慌,首先看報錯日誌,為什麼報錯,再尋求解決辦法。 nginx: [alert] kill(25903, 1) failed (3: No such process) 通過在nginx/sbin,目錄下 執行命令 ./nginx ,

樹莓派 E: Sub-process /usr/bin/dpkg returned an error code (1)解決方法

當你在終端使用sudo apt-get install (檔名)-----安裝檔案時突然報錯: E: Sub-process /usr/bin/dpkg returned an error code  看看錯誤原因,裡面如果有: Traceback (most recent c

Gitlab庫已損壞前端顯示500錯誤解決方法:remote: fatal: loose object xxx is corrupt

今天團隊小夥伴們在git push的時候報錯: remote: error: object file ./objects/ba/8dd150f67fe38c7e9d8cf44eee7c38b0afe34e is empty remote: error: object f

Android Http請求失敗解決方法

1、MainActivity.java 檔案中的onCreate方法改成如下: @SuppressLint("NewApi") @Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCrea

Re-installation failed due to different application signatures.解決方法

除錯資訊如下:[2012-04-07 14:38:37 - HelloDemo] Re-installation failed due to different application signatures. [2012-04-07 14:38:37 - HelloDemo

關於某些網站的圖片盜鏈功能,相關http 請求的解決方法

其實 關鍵就是 header中 的 Referer 屬性,可以通過firebug 檢視頭資訊 並獲得Referer,但有些情況下可能不能獲取,就只能通過抓包的方法來獲得了。 [java] view plain copy print? import java.io.BufferedInputSt

新手ubuntu下已成功安裝hadoop情況下,安裝eclipse開啟失敗出現JVM terminated. Exit code=1解決方法

最初以為是環境變數配置問題導致的出錯。經過一番百度後發現,由第三行看出eclipse需要的是jdk1.8。而自己的JDK是1.7的,而剛從Eclipse官網下載的Eclipse是最新版的,支援的JDK為1.8,所以導致錯誤。 查詢本機jdk版本,指令如下: $ jav

curl無法訪問http/https的解決方法

今天一個師兄說一個程式一直都出現50錯誤..得不到解決 工作人員排除了客戶端的問題,然後扔了一個curl元件,讓師兄自己測試。 我也好奇湊了上去.. 咦,這好像是代理弄的埠啊,我順藤摸瓜查了一下誰佔用了埠 然而並沒發現有程式佔用埠 我懷疑是不是代理,然後,我運行了工

Import cv2 ImportError:DLL load failed:找不到指定模組 解決方法

實驗環境: 系統版本:Win 10 企業版 Anaconda :Python 3.5.2 | Anaconda 4.2.0(64-bit) 問題描述: 安裝OpenCV後使用import cv2 時出現如下錯誤 解決方法: 將pyth

在Ubuntu下搭建Eclipse+SVN,涉及 Failed to load JavaHL Library的解決方法

本篇文章獻給那些每做一步都會報錯的人。         首先,在終端執行sudo apt-get install subversion。         接著,在       下載完成以後,進入eclipse當年的安裝目錄,在此安裝目錄下建立一個新的資料夾links,將剛才

svn cleanup failed–previous operation has not finished 解決方法

第一種方法:(主要針對舊版的svn) 轉自:http://www.cnblogs.com/bicker/p/3312394.html 今天svn遇到一個頭疼的問題,最開始更新的時候失敗了,因為有檔案被鎖住了。按照以往的操作,我對父目錄進行clean up操作,但是cl

V4L2 中error 22, Invalid argument的解決方法

Error: pixel format not supported  error 22, Invalid argument 我的攝像頭是筆記本上自帶的,用命令lsusb看到的情況如下: Bus 002 Device 003: ID 17ef:4808 Lenovo