Contents
git cloneでエラーが発生
remote-dev1@DESKTOP MSYS ~/test_dev
$ git clone ssh://xxx@xxxxxxxx.jp/home/xxxxxxx/public_html/project/
Cloning into 'project'...
remote: Enumerating objects: 23173, done.
remote: Counting objects: 100% (23173/23173), done.
remote: fatal: unable to create thread: Resource temporarily unavailable
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
解決方法
1.サーバー内にgitを実行するユーザーとしてリモートシステムにログインし、下記を実行
git config --global pack.windowMemory "100m"
git config --global pack.packSizeLimit "100m"
git config --global pack.threads "1"
2.ローカル側で下記を実行し、ファイルを分割してcloneする
remote-dev1@DESKTOP MSYS ~/test_dev
$ git clone --depth 1 ssh://xxx@xxxxxxxx.jp/home/xxxxxxx/public_html/project/
Cloning into 'project'...
remote: Enumerating objects: 2875, done.
remote: Counting objects: 100% (2875/2875), done.
remote: Compressing objects: 100% (2443/2443), done.
remote: Total 2875 (delta 415), reused 2555 (delta 318)
Receiving objects: 100% (2875/2875), 51.11 MiB | 4.61 MiB/s, done.
Resolving deltas: 100% (415/415), done.
Updating files: 100% (3141/3141), done.
3.--depthにて分割cloneした「project」フォルダへ移動
remote-dev1@DESKTOP MSYS ~/test_dev
$cd project/
4.残りのファイルを分割「--depth」でfetchする。
※--depth 10や--depth 100などに分けてfetch実行
remote-dev1@DESKTOP MSYS ~/test_dev/project
$ git fetch --depth 10
remote: Enumerating objects: 179, done.
remote: Counting objects: 100% (179/179), done.
remote: Compressing objects: 100% (102/102), done.
Receiving objects: 52% (65/125)remote: Total 125 (delta 94), reused 33 (delta 23)
Receiving objects: 100% (125/125), 164.44 KiB | 27.41 MiB/s, done.
Resolving deltas: 100% (94/94), completed with 34 local objects.
5.全てのファイルをfetchすると、下記のようになり完了。
remote-dev1@DESKTOP MSYS ~/test_dev/project
$ git fetch --depth 10
remote: Total 0 (delta 0), reused 0 (delta 0)