9
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Gitのpush制限に引っかかった話

Posted at

あらまし

ローカル端末で1月ほど開発をしていたリポジトリを久しぶりにプッシュしようとしたが,エラーで弾かれました.

.該当エラー抜粋
error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400

→リクエストがサーバ側で弾かれてしまっている...

原因究明

requested URL returned errorの記載から以下の仮説を立てました.

  • URLにアクセスできることから,接続先が壊れたわけではなさそう
  • 認証エラーなら別の文言が出力されてそう...(authenticationとか)

認証エラーなら別の文言が出力されてそう...(authenticationとか)

については自信がなかったので,同リポジトリをクローンできるか検証しました.
結果,問題なくクローンできたため認証系は問題ないことが確認できました.

GPT先生に聞いたところ

仮説を立てたところで,GPT先生に聞いたところ送信可能ファイルサイズの上限に引っかかっているのではとの回答が返ってきました.

どうやら,git config(global)にhttp.postbufferという項目があり,この項目が送信ファイルサイズの上限を指定しているようでした.
試しにgit config --global http.postBufferとコマンドを実行したところ出力はなし.
git config --global --listで出力しても項目がありません.

とりあえずgit config --global http.postBuffer 500Mで値を設定し,再度git config --global http.postBufferを実行すると500Mと出力が出ました.(初期で項目はないタイプらしい...)

再度プッシュを試してみると,問題なく反映されました.

結論

Git導入初期ではプッシュサイズに上限があり,改めて設定する必要があるようです(該当コマンド以下).

.該当コマンド
git config --global http.postBuffer 500M
9
2
0

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
9
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?