# Ketika Git Clone gagal melulu? ini solusinya.

Sering mendapatkan error ketika melakukan git clone seperti dibawah ini:

```plaintext
error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
error: 7313 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
```

Error ini biasanya muncul karena ada masalah koneksi saat proses `git clone`. Beberapa solusi yang bisa kamu coba:

### 🚀 **Solusi 1: Atur Buffer Git**

Masalah ini sering disebabkan oleh batas buffer yang terlalu kecil. Coba tingkatkan buffer Git:

```plaintext
bashCopyEditgit config --global http.postBuffer 524288000
```

(Angka itu setara dengan 500MB — cukup besar untuk menghindari limit koneksi.)

### 🚨 **Solusi 2: Paksa HTTP/1.1**

Coba jalankan ini untuk memaksa Git menggunakan HTTP/1.1:

```bash
git config --global http.version HTTP/1.1
```

Lalu ulangi clone-nya:

```bash
git clone https://github.com/Ariska138/hadits-database
```

---

### 📦 **Solusi 3: Clone secara parsial (shallow clone)**

Kalau repo cukup besar, coba ambil sebagian dulu (khususnya buat koneksi yang suka putus):

```bash
git clone --depth 1 https://github.com/Ariska138/hadits-database
```

Kalau sudah berhasil, nanti bisa di-expand:

```bash
cd hadits-database
git fetch --unshallow
```

---

### 🏎️ **Solusi 4: Ubah transport ke SSH**

Kalau masalahnya di protokol HTTPS, kamu bisa coba via SSH (pastikan sudah setup SSH key di GitHub):

```bash
git clone git@github.com:Ariska138/hadits-database.git
```

---

### ⚡ **Solusi 5: Set timeout lebih panjang**

Supaya koneksi nggak gampang putus:

```bash
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
```

---

### ✅ **Solusi 5: Cek koneksi**

Terakhir, pastikan koneksi internet kamu stabil. Bisa tes:

```bash
ping google.com
```

Atau coba clone di jaringan yang lebih stabil (misalnya tethering dari HP kalau Wi-Fi-nya bermasalah).

---

Cobain satu-satu ya! Aku tunggu update-mu — kalau masih error, kita lanjut pecahkan bareng! 💪
