簡體   English   中英

自托管 gitlab 服務器,帶有 RPi 和pitunnel,在嘗試推送時顯示 http 錯誤 413

[英]Self-hosted gitlab server with with RPi and pitunnel showing http error 413 when trying to push

1.問題

如果一個文件大於 ~1MB,則 git 推送命令會返回以下錯誤:

Pushing to http://mygitlabserver.pitunnel.com/root/my_project.git
POST git-receive-pack (1163897 bytes)
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

服務器是帶有 SSD 的 RPi 4。 通過pitunnel(標准訂閱)訪問。

  • 如果一個文件大於 1MB,則推送失敗
  • 即使提交是 150MB(很多小文件),推送也不會返回錯誤
  • 如果推送多個 MB 的 mp3 文件,則推送不會返回錯誤。

2.問題

不是真正的問題,但它可能與另一個問題有關

如果導入從 gitlab.com 導出的大型項目,則會返回相同的錯誤:

413 請求實體太大nginx/1.10.3 (Ubuntu)

但只有通過pitunnel(鏈接)連接,如果項目上傳到本地網絡,它才能工作。

nginx 似乎是問題所在。 在 gitlab.rb 文件中設置了以下參數,並根據gitlab 文檔重新啟動了 gitlab 服務:

nginx['enable'] = true
nginx['client_max_body_size'] = '900m'

PS:這個問題解決后repo會使用git LFS。

對於所有有類似問題的人:問題是 Pitunnel。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM