3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

git labでpushすると「protocol error: bad line length 8192」エラーになる。

Last updated at Posted at 2019-10-14

エラーの内容

機械学習教師データの大量画像ファイルをpushするとエラーになる。

Enumerating objects: 50423, done.
Counting objects: 100% (50423/50423), done.
Delta compression using up to 32 threads
Compressing objects: 100% (49817/49817), done.
fatal: protocol error: bad line length 8192
fatal: the remote end hung up unexpectedly
fatal: sha1 file '<stdout>' write error: Broken pipe
error: failed to push some refs to 'http://xxx.xxx.xxx.xxx/xxxx/xxxxx.git'

他のリポジトリはOKなので、意味がわからない。。
postBuffer = 10485760000
な極端に大きな値にしてもダメ
length 8192ってURLの限界?とおもった。sshでつなげばいいんじゃない?

対処

結果的にsshでした。
HTTPでcloneすると大量のファイル数に対応できないみたい。

キーを作成
centosでssh-keygen -t rsa -f id_rsaを実行してキーを作る。
id_rsa以外の名前にすると動きません。
任意の名前にしたい場合.ssh/configを作ってあげる必要がある。
privateキーをWindowsのユーザープロファイルの[.ssh]フォルダへ格納する。

publicキーをgitlabのユーザーに登録。

cloneしたリポジトリの
.git\configをsshのurlにする

[remote "origin"]
	url = git@ごにょ:gonyo/ごにょ.git

TortoiseGit

TortoiseGitの設定をsshで使えるようにするため、「設定>ネットワーク、SSHクライアント」を
C:\Program Files\Git\usr\bin\ssh.exeに変更する。
↑は私の環境なので実際のssh.exeを探して設定する。

3
1
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
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?