LoginSignup
14
18

More than 5 years have passed since last update.

【質問 / 解決】Gitlabに大きいファイルがコミットできない

Last updated at Posted at 2013-11-28

Gitlab6.0に大きいファイル(50MB)をコミットできない

インストールはこちらを利用しました
https://github.com/akagisho/gitlab-installer/

ただ,現在 rubyforge.org が落ちているようなので,rubygemsは最新版の 2.1.7 を入れています.

git push しようとすると…

下記エラーが表示されます.

git.exe push --progress  "origin" master

Counting objects: 139, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (122/122), done.
Writing objects: 100% (139/139), 50.52 MiB | 13.69 MiB/s, done.
Total 139 (delta 7), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
error: RPC failed; result=22, HTTP code = 413
Everything up-to-date

Http Status Code 413, Request Entity Too Large ですね.

アップロードできる上限サイズを変更する

gitlab-installerでインストールするとnginxの設定ファイルは /etc/nginx/conf.d/gitlab.conf となるので,ここの serverセクションに client_post_max_size(*1) 500M を設定します (*1 client_max_body_size の表記ミスです)
(参考)
http://stackoverflow.com/questions/7489813/github-push-error-rpc-failed-result-22-http-code-413

また, /home/git/gitlab/conf/gitlab.yml のmax_sizeも 524288000 へ変更します

そして,変化無し…

でも,上記エラーは改善しません.
わらをもつかむ感じで, /etc/nginx/nginx.conf のhttpセクションにも同様の設定を書いてみますが,変わりませんでした.
また, git config http.postBuffer 524288000 も試みますが,変わり有りませんでした.

何か他に心当たりがある方,ご教授いただければ幸いです.
よろしくお願いします.

余談

小さなファイルのコミットは正常に処理されます.

解決

asahina_dev さんのコメントで解決しました.

proxy が刺さってるってことは proxy が返している可能性もありますよ。

お?.お!.

なんかもうnginxとかgitlabとか全然関係なくてごめんなさい

まさしくproxyが返していたようです.
これに気づくのに必要なファクターは持っていました.

  1. POSTのアクセスログが無かったこと
  2. 413を返したというエラーログも無かったこと

これらてっきりどこかの設定ミスで出力されないだけかと思ってしまって,proxyが413を返す可能性を考えられていませんでした.

というわけで,Proxyを介さず直に接続して解決しました.
コメントくださった皆様ありがとうございました.

14
18
7

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
18