11

I am trying to clone a (private) remote repository but I am getting following error:

 remote: Counting objects: 11410, done
 remote: Finding sources: 100% (11410/11410)
 remote: Getting sizes: 100% (9178/9178)
 error: RPC failed; result=56, HTTP code = 200
 error: inflate: data stream error (invalid block type)
 fatal: pack has bad object at offset 427781: inflate returned -3

I am using Git version 1.9.4 on Windows 8 Pro Build 9200. There are large files on that repo, but file size seems irrelevant to my problem because I still get the same error when I try to clone some other smaller repository (<20Mb with AppHarbor). Any ideas ?

jub0bs
  • 60,866
  • 25
  • 183
  • 186
Oleh
  • 447
  • 1
  • 11
  • 30
  • Sounds like I have some problem via internet http://git.661346.n2.nabble.com/Problem-while-cloning-a-git-repo-td7599236.html but I still cant understand which problems – Oleh Aug 22 '14 at 10:28
  • https://appharbor.com/ You can push and deploy .Net project up to 20 mb free – Oleh Aug 22 '14 at 11:02
  • 1
    What can you tell us about your network config? Have you read [this](http://smartgit.3668570.n2.nabble.com/clone-fails-RPC-failed-result-56-HTTP-code-200-tp7574837p7574853.html)? – jub0bs Aug 22 '14 at 11:09
  • I am not sure that I can tell You something about my network config. Now I am waiting for admin. Maybe he will find some problem – Oleh Aug 22 '14 at 11:12
  • Show your sysadmin the link in my comment; that may help. – jub0bs Aug 22 '14 at 11:13
  • Yes, sure, I will show – Oleh Aug 22 '14 at 11:14
  • I use Avast, Admin turned it off. (Disable protect) and now everything is ok – Oleh Aug 22 '14 at 13:22

4 Answers4

8

My sysadmin figured out that the problem was with Avast. If you're experiencing the same problem and you use Avast, then try disabling it. That fixed my problem.

Will Bickford
  • 5,381
  • 2
  • 30
  • 45
Oleh
  • 447
  • 1
  • 11
  • 30
4

The git binaries I've found in ubuntu and debian both have this bug. It's caused by a bug in GnuTLS which git is compiled against (tracked here). It's simply not possible to clone a git repo in Ubuntu or Debian with a HTTPS URL.

You have two options:

  1. Clone the repo using SSH
  2. Recompile git against libcurl4-openssl-dev (libcurl4-gnutls-dev didn't work for me)

In case you decide for option #2, here's a copy/paste to recompile the latest git on debian or ubuntu. The latest version of git is found here.

apt-get update \
&& apt-get install -y build-essential libcurl4-openssl-dev libexpat1-dev gettext libz-dev libssl-dev autoconf \
&& wget https://github.com/git/git/archive/v2.8.1.tar.gz -O git.tar.gz \
&& tar -zxf git.tar.gz \
&& cd git-* \
&& make configure \
&& ./configure --prefix=/usr  \
&& make install
itzmebibin
  • 9,199
  • 8
  • 48
  • 62
gogstad
  • 3,607
  • 1
  • 29
  • 32
0

I solved it by using SSH to perform the clone. Solution found here.

To use SSH with Bitbucket, you create an SSH identity. An identity consists of a private and a public key which together are a key pair. The private key resides on your local computer and the public you upload to your Bitbucket account. Once you upload a public key to your account, you can use SSH to connect with repositories you own and repositories owned by others, provided those other owners give your account permissions. By setting up SSH between your local system and the Bitbucket server, your system uses the key pair to automate authentication; you won't need to enter your password each time you interact with your Bitbucket repository.

Here's how to Setup SSH for Git.

Mukesh Chapagain
  • 25,063
  • 15
  • 119
  • 120
-1

I have the same problem on my Ubuntu environment, run export GIT_CURL_VERBOSE=1 solve it. Here is the link.

itzmebibin
  • 9,199
  • 8
  • 48
  • 62
feng
  • 59
  • 1
  • This setting will just make git console output more verbose. Possibly this will give you a hint why the error occurs, but it won't solve it. – Christopher Oct 14 '16 at 13:11