Type Here to Get Search Results !

Mengatasi Error Pada Git "fatal early EOF, fatal index-pack failed"

 

Kemarin saya sempat di buat marah oleh error yang terjadi saat cloning repositori dari remote server. Biasanya saja menggunakan protokol HTTPS untuk proses transaksi data. Karena kurang praktis, akhirnya saya mengubah semua Remote URL repositori saya ke SSH. Sayangnya, saat saya melakukan cloning dari remote server muncul pesan error seperti berikut:



1
2
3
4
5
6
7
8
git clone git@bitbucket.org:emsuryadi/repository.git repo
Cloning into 'repo'...
remote: Counting objects: 638, done.
remote: Compressing objects: 100% (544/544), done.
Connection to bitbucket.org closed by remote host.00 KiB/s    
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Setelah mondar-mandir sana sini, akhirnya ketemu juga jawabanya. Ternyata error ini terjadi karena limit memory dan kompresi pada git. Untuk mengatasinya lakukan perintah berikut.
Matikan kompresi pada saat transfer:

on Linux
Execute the following in the command line before executing the Git command:
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1

On Windows
Execute the following in the command line before executing the Git command:
set GIT_TRACE_PACKET=1
set GIT_TRACE=1
set GIT_CURL_VERBOSE=1
git config --global core.compression 0
Selanjutnya, kita lakukan clone parsial untuk mengurangi jumlah data yang diambil:
git clone --depth 1 [repo_uri]/[repo_uri]
Jika berhasil, masuk ke direktori baru kemudian ambil sisa kloningnya:
git fetch --unshallow
atau alternatifnya,
git fetch --depth=2147483647
Selanjutnya, pull seperti biasanya:
git pull --all

Sumber:
  1. https://stackoverflow.com/questions/21277806/fatal-early-eof-fatal-index-pack-failed
  2. https://bitbucket.org/site/master/issues/13290/connection-to-bitbucketorg-closed-by
Tags

Posting Komentar

0 Komentar