338

I have googled and found many solutions but none work for me.

I am trying to clone from one machine by connecting to the remote server which is in the LAN network.
Running this command from another machine cause error.
But running the SAME clone command using git://192.168.8.5 ... at the server it's okay and successful.

Any ideas ?

user@USER ~
$ git clone  -v git://192.168.8.5/butterfly025.git
Cloning into 'butterfly025'...
remote: Counting objects: 4846, done.
remote: Compressing objects: 100% (3256/3256), done.
fatal: read error: Invalid argument, 255.05 MiB | 1.35 MiB/s
fatal: early EOF
fatal: index-pack failed

I have added this config in .gitconfig but no help also.
Using the git version 1.8.5.2.msysgit.0

[core]
    compression = -1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
William
  • 4,088
  • 6
  • 18
  • 35

36 Answers36

615

First, turn off compression:

git config --global core.compression 0

Next, let's do a partial clone to truncate the amount of info coming down:

git clone --depth 1 <repo_URI>

When that works, go into the new directory and retrieve the rest of the clone:

git fetch --unshallow 

or, alternately,

git fetch --depth=2147483647

Now, do a regular pull:

git pull --all

I think there is a glitch with msysgit in the 1.8.x versions that exacerbates these symptoms, so another option is to try with an earlier version of git (<= 1.8.3, I think).

kurtzmarc
  • 2,978
  • 1
  • 20
  • 38
ingyhere
  • 8,842
  • 3
  • 28
  • 41
  • 8
    Thank you, this worked great. I had tried changing the http.postbuffer which didn't work, but after doing as stated in this answer, it worked great. I didn't use the "git fetch --depth=2147483647" line, but I used the rest. – Nick Benedict Jun 24 '14 at 13:55
  • `git clone --depth 1` gives me the error `You must specify a repository to clone.` – Eliza Wilson Jul 17 '14 at 22:46
  • 2
    @EthenA.Wilson You need to pass in the remote url for the repository afterwards. E.g. `git clone --depth 1 git@host:user/my_project.git`. – Nathan Gould Aug 27 '14 at 17:44
  • 1
    git clone --depth 1 works for me but then when doing git fetch --unshallow throws the initial error at the end.. How can i get the remaining files of the rep? – Jose A. Mar 19 '15 at 11:35
  • 6
    @Jose A. -- I experienced this problem when I was on a newer version of msysgit. If you are on msysgit, try an older version (<=1.8.3). Otherwise, try git fetch --depth 1000 (then 2000, etc., increasing incrementally until all the files are pulled). – ingyhere Mar 19 '15 at 15:25
  • 3
    @Jose A. -- Also, have a look at this: http://stackoverflow.com/questions/4826639/repack-of-git-repository-fails – ingyhere Mar 19 '15 at 15:29
  • 2
    Hi, dear friend. Thank you for your great solution. But the last `git pull --all` not works. Because of `git clone --depth 1` will set fetching range only one branch. So we have to edit .git/config first. – pjincz Jul 09 '16 at 16:11
  • 1
    Be aware that this is not a real solution as it will set fetching to only one branch and you might end up in this situation: http://stackoverflow.com/questions/20338500/git-repository-lost-its-remote-branches – wranvaud Oct 19 '16 at 18:59
  • @William and pjincz: It's as real as it gets. On initial repo clone, Git doesn't create local branches to match remotes because it works off a lean paradigm. You will have to script local branch creation as I suggest in [this post to ensure that all remote branches are created locally](http://stackoverflow.com/a/21591209/325452). Anyway, I wouldn't add this to a clone if you're having problems -- get the repo pulled first, and then worry about syncing branches. – ingyhere Jan 03 '17 at 20:34
  • Works great, but why is `core.compression = 0` such an important factor in ensuring successful transmissions? Shouldn't `core.compression = 0` become default then? (I think git internally compresses nicely, so maybe the problem is compression of compressed data which can actually enlarge the data.) – peschü Feb 09 '17 at 15:55
  • 1
    Moreover with `git clone --depth 1 ` followed by `git fetch --unshallow` followed by `git pull --all` I did not get all remote branches. `git branch -a` does not show them, only shows `master`. How can I get other remote branches registered in the unshallowed repo? – peschü Feb 09 '17 at 16:09
  • 1
    @peschü: See my answer [here](http://stackoverflow.com/a/21591209/325452). `git branch -r | awk -F'origin/' '!/HEAD|master/{print $2 " " $1"origin/"$2}' | xargs -L 1 git branch -f --track` – ingyhere Feb 11 '17 at 00:12
  • This is the only thing that worked for me, after trying several other solutions. What is the purpose of turning compression off? It should be turned back on after pull -all? – MidnightJava May 09 '17 at 21:10
  • 1
    Just disabling compression fixed it for me. – Nic Cottrell Nov 10 '17 at 13:04
  • I am unable to see all the remote branches when I do `git branch -r`, whereas I am able to see all those branches in normally cloned folder. How do I get all the remote branches? – Nisarg Patil Apr 19 '18 at 12:14
  • 2
    Adding to @pjincz comment, and for us the not so versed on git config files, the actual change required to get the `git fetch --all` to work is to change `fetch = +refs/heads/master:refs/remotes/origin/master` to `fetch = +refs/heads/*:refs/remotes/origin/*` ( `master` to `*` ), this line must be below the node `[remote "origin"]`. Close the file and repeat the `git fetch --all` command. Tested with git version `2.19.2.windows.1` – Lorenzo Solano Martinez Nov 27 '18 at 14:35
  • It would be nice if someone could explain the problem and what this solution does to solve it in the answer. – GoGoris Oct 22 '19 at 07:56
  • how do you know this much about git :O – Aravin Apr 16 '20 at 12:16
  • It doesn't worked first time, after multiple times it worked. What does it do internally? – Aravin Apr 16 '20 at 13:08
  • I found the SSH protocol is faster than others, E.g. `git clone --depth 1 git@host:user/my_project.git`. – Winter May 21 '20 at 11:40
  • why turn off the compression though? – helix Jun 19 '20 at 05:04
  • 2
    The `core.compression` value is used as a default for all other compression parameters. If there are network issues or server instabilities, while at the same time dealing with massive packs or giant files, compression can be costly in terms of time. When dealing with network instabilities, including retries and potentially timeouts, the extra time cost to compress giant files can presage a timeout. Likewise, delta compression on a misconfigured server with big files can tax memory usage, so disabling compression may rectify misconfiguration by preventing memory bottlenecks. – ingyhere Jun 22 '20 at 06:47
  • 1
    This procedure breaks the clone into small, manageable chunks. Git itself ([abstracted as a micro filesystem](https://www.theguild.nl/git-the-object-database/)) consists of blobs, trees and maps holding file commit data. [A `pull` is shorthand for `fetch` then `merge`.](https://stackoverflow.com/questions/9237348/what-does-fetch-head-in-git-mean) If the fetch part is screwed up the merge (actually an unwind onto the new default branch) will fail. A shallow clone creates a skeleton of the repo without the giant history but including current files. Later steps pull down the larger file history. – ingyhere Jun 22 '20 at 07:17
  • Even doing that it failed a couple of times. I kept retrying and it finally worked. Thanks. – Andrei Bazanov Oct 09 '20 at 15:32
  • Because this still occurs I thought I'd add that dmesg pointed th way in my case... out of memory (which occured during decompressing delta packs). I added a swp file on my ssd attached to my odroid and rocked away. Yes, their was considerable context switching, bu it worked. The solution in this article works better. – uDude Oct 17 '20 at 07:15
  • A minor point, but after the git clone you have to cd into the repo directory before doing the git fetch. – Ron HD Jan 21 '21 at 05:00
  • Thnx, that great – Booharin Mar 04 '21 at 16:29
  • 1
    Thank you very much. This method saved my day. But sir, can you please tell us why we are getting this type of error. In my case my network also good and there are no large files in the repository too. Could you please add that to your answer too, please? – Pawara Siriwardhane Mar 07 '21 at 03:40
  • @Pawara I'd really like to help but there's no way to know the root cause without diagnosing actual systems involved. As developers many times we don't have access to the server, either. – ingyhere Mar 07 '21 at 16:07
  • @ingyhere I do understand. Thank you very much. – Pawara Siriwardhane Mar 07 '21 at 16:18
117

This error may occur for memory needs of git. You can add these lines to your global git configuration file, which is .gitconfig in $USER_HOME, in order to fix that problem.

[core] 
packedGitLimit = 512m 
packedGitWindowSize = 512m 
[pack] 
deltaCacheSize = 2047m 
packSizeLimit = 2047m 
windowMemory = 2047m
bhdrkn
  • 5,156
  • 4
  • 32
  • 42
36

finally solved by git config --global core.compression 9

From a BitBucket issue thread:

I tried almost five times, and it still happen.

Then I tried to use better compression and it worked!

git config --global core.compression 9

From the Git Documentation:

core.compression
An integer -1..9, indicating a default compression level. -1 is the zlib default.
0 means no compression, and 1..9 are various speed/size tradeoffs, 9 being slowest.
If set, this provides a default to other compression variables, such as core.looseCompression and pack.compression.

lucidbrot
  • 3,789
  • 2
  • 27
  • 54
Jacky
  • 1,439
  • 1
  • 13
  • 16
  • 4
    Needed to run `git repack` in combination with this solution and then it worked. – erikH Oct 19 '18 at 13:59
  • That worked, didn't even try other solutions because this one is the shortest and most elegant. should be accepted answer! – metablaster Dec 02 '19 at 02:38
  • This works for me too, through VPN and corporate proxy. `--compression 0` did not work nor did all the `.gitconfig` changes suggested above. – Terrence Brannon Dec 09 '19 at 22:33
  • Probably [changing the config parms here](https://stackoverflow.com/a/29355320/325452) (to reduce size of transferred data) would do the job, alternately. – ingyhere Aug 06 '20 at 17:52
27

As @ingyhere said:

Shallow Clone

First, turn off compression:

git config --global core.compression 0

Next, let's do a partial clone to truncate the amount of info coming down:

git clone --depth 1 <repo_URI>

When that works, go into the new directory and retrieve the rest of the clone:

git fetch --unshallow

or, alternately,

git fetch --depth=2147483647

Now, do a pull:

git pull --all

Then to solve the problem of your local branch only tracking master

open your git config file (.git/config) in the editor of your choice

where it says:

[remote "origin"]
    url=<git repo url>
    fetch = +refs/heads/master:refs/remotes/origin/master

change the line

fetch = +refs/heads/master:refs/remotes/origin/master

to

fetch = +refs/heads/*:refs/remotes/origin/*

Do a git fetch and git will pull all your remote branches now

James C.
  • 11,076
  • 2
  • 29
  • 37
cmpickle
  • 592
  • 10
  • 10
  • 1
    It works, but I left compression to 9 not 0 which failed. – metablaster Apr 16 '20 at 16:21
  • You could also do this: `git branch -r | awk -F'origin/' '!/HEAD|master/{print $2 " " $1"origin/"$2}' | xargs -L 1 git branch -f --track` followed by `git fetch --all --prune --tags` and `git pull --all`. It will set all remote tracking branches locally. – ingyhere Aug 06 '20 at 17:48
  • Perfect! This shoul've been the answer. – venugopal May 21 '21 at 18:08
12

In my case this was quite helpful:

git clone --depth 1 --branch $BRANCH $URL

This will limit the checkout to mentioned branch only, hence will speed up the process.

Hope this will help.

sMajeed
  • 165
  • 2
  • 10
7

I tried all of that commands and none works for me, but what works was change the git_url to http instead ssh

if is clone command do :

git clone <your_http_or_https_repo_url> 

else if you are pulling on existing repo, do it with

git remote set-url origin <your_http_or_https_repo_url>

hope this help someone!

elin3t
  • 1,703
  • 1
  • 22
  • 26
  • 1
    This question is really about the error message in the output above when there's a problem syncing giant chunks of files from a connected repo. You're saying that cutting over to https from ssh allowed the clone to finish? – ingyhere Dec 11 '14 at 01:48
  • Yes! That work for me, I have a 4gb+ repo and the only one solution I got that work was that! – elin3t Dec 11 '14 at 03:17
  • 2
    It works for me, thank you! Clone by `https` and then set remote back to `ssh`. – Tuan Nov 14 '17 at 15:47
  • 1
    I'd really like to know _why_ this worked. Is there something in the SSH protocol that chokes on large objects that HTTPS does not? Is this a transport layer issue? – bdetweiler Dec 18 '18 at 13:55
7

I got this error when git ran out of memory.

Freeing up some memory (in this case: letting a compile job finish) and trying again worked for me.

André Laszlo
  • 13,970
  • 2
  • 60
  • 73
6

In my case it was a connection problem. I was connected to an internal wifi network, in which I had limited access to ressources. That was letting git do the fetch but at a certain time it crashed. This means it can be a network-connection problem. Check if everything is running properly: Antivirus, Firewall, etc.

The answer of elin3t is therefore important because ssh improves the performance of the downloading so that network problems can be avoided

iberbeu
  • 12,251
  • 5
  • 24
  • 47
4

Setting below's config doesn't work for me.

[core] 
packedGitLimit = 512m 
packedGitWindowSize = 512m 
[pack] 
deltaCacheSize = 2047m 
packSizeLimit = 2047m 
windowMemory = 2047m

As previous comment, it might the memory issue from git. Thus, I try to reduce working threads(from 32 to 8). So that it won't get much data from server at the same time. Then I also add "-f " to force to sync other projects.

-f: Proceed with syncing other projects even if a project fails to sync.

Then it works fine now.

repo sync -f -j8
KimmyYang
  • 81
  • 4
2

A previous answer recommends setting to 512m. I'd say there are reasons to think that's counterproductive on a 64bit architecture. The documentation for core.packedGitLimit says:

Default is 256 MiB on 32 bit platforms and 32 TiB (effectively unlimited) on 64 bit platforms. This should be reasonable for all users/operating systems, except on the largest projects. You probably do not need to adjust this value.

If you want to try it out check if you have it set and then remove the setting:

git config --show-origin core.packedGitLimit
git config --unset --global core.packedGitLimit
8DH
  • 1,712
  • 23
  • 32
2

I was getting the same error, on my side i resolved by running this command, In windows it has some memory issue.

git config --global pack.windowsMemory 256m
Umair Iqbal
  • 1,085
  • 2
  • 11
  • 20
1

In my case nothing worked when the protocol was https, then I switched to ssh, and ensured, I pulled the repo from last commit and not entire history, and also specific branch. This helped me:

git clone --depth 1 "ssh:.git" --branch “specific_branch”

Shripada
  • 5,511
  • 1
  • 27
  • 29
1

I have the same problem. Following the first step above i was able to clone, but I cannot do anything else. Can't fetch, pull or checkout old branches.

Each command runs much slower than usual, then dies after compressing the objects.

I:\dev [master +0 ~6 -0]> git fetch --unshallow
remote: Counting objects: 645483, done.
remote: Compressing objects: 100% (136865/136865), done.

error: RPC failed; result=18, HTTP code = 20082 MiB | 6.26 MiB/s

fatal: early EOF

fatal: The remote end hung up unexpectedly

fatal: index-pack failed

This also happens when your ref's are using too much memory. Pruning the memory fixed this for me. Just add a limit to what you fetching like so ->

git fetch --depth=100

This will fetch the files but with the last 100 edits in their histories. After this, you can do any command just fine and at normal speed.

agc
  • 7,002
  • 2
  • 25
  • 44
Vishav Premlall
  • 376
  • 4
  • 19
1

Note that Git 2.13.x/2.14 (Q3 2017) does raise the default core.packedGitLimit which influences git fetch:
The default packed-git limit value has been raised on larger platforms (from 8 GiB to 32 GiB) to save "git fetch" from a (recoverable) failure while "gc" is running in parallel.

See commit be4ca29 (20 Apr 2017) by David Turner (csusbdt).
Helped-by: Jeff King (peff).
(Merged by Junio C Hamano -- gitster -- in commit d97141b, 16 May 2017)

Increase core.packedGitLimit

When core.packedGitLimit is exceeded, git will close packs.
If there is a repack operation going on in parallel with a fetch, the fetch might open a pack, and then be forced to close it due to packedGitLimit being hit.
The repack could then delete the pack out from under the fetch, causing the fetch to fail.

Increase core.packedGitLimit's default value to prevent this.

On current 64-bit x86_64 machines, 48 bits of address space are available.
It appears that 64-bit ARM machines have no standard amount of address space (that is, it varies by manufacturer), and IA64 and POWER machines have the full 64 bits.
So 48 bits is the only limit that we can reasonably care about. We reserve a few bits of the 48-bit address space for the kernel's use (this is not strictly necessary, but it's better to be safe), and use up to the remaining 45.
No git repository will be anywhere near this large any time soon, so this should prevent the failure.

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
1

Using @cmpickle answer, I built a script to simplify the clone process.

It is hosted here: https://gist.github.com/gianlucaparadise/10286e0b1c5409bd1049d67640fb7c03

You can run it using the following line:

curl -sL https://git.io/JvtZ5 | sh -s repo_uri repo_folder
gianlucaparadise
  • 1,194
  • 15
  • 21
1

In my case the problem was none of the git configuration parameters but the fact that my repository had one file exceeding the maximum file size allowed on my system. I was able to check it trying to download a large file and getting an "File Size Limit Exceeded" on Debian.

After that I edited my /etc/security/limits.conf file adding et the end of it the following lines:

  • hard fsize 1000000
  • soft fsize 1000000

To actually "apply" the new limit values you need to re-login

BuZZ-dEE
  • 3,875
  • 7
  • 48
  • 76
tpalanques
  • 73
  • 7
1

Tangentially related and only useful in case you have no root access and manually extract Git from an RPM (with rpm2cpio) or other package (.deb, ..) into a subfolder. Typical use case: you try to use a newer version of Git over the outdated one on a corporate server.

If git clone fails with fatal: index-pack failed without early EOF mention but instead a help message about usage: git index-pack, there is a version mismatch and you need to run git with the --exec-path parameter:

git --exec-path=path/to/subfoldered/git/usr/bin/git clone <repo>

In order to have this happen automatically, specify in your ~/.bashrc:

export GIT_EXEC_PATH=path/to/subfoldered/git/usr/libexec
Tyblitz
  • 7,777
  • 3
  • 21
  • 45
1

It's confusing because Git logs may suggest any connection or ssh authorization errors, eg: ssh_dispatch_run_fatal: Connection to x.x.x.x port yy: message authentication code incorrect, the remote end hung up unexpectedly, early EOF.

Server-side solution

Let's optimize git repository on the server side:

  1. Enter to my server's git bare repository.
  2. Call git gc.
  3. Call git repack -A

Eg:

ssh admin@my_server_url.com
sudo su git
cd /home/git/my_repo_name # where my server's bare repository exists.
git gc
git repack -A

Now I am able clone this repository without errors, e.g. on the client side:

git clone git@my_server_url.com:my_repo_name

The command git gc may be called at the git client side to avoid similar git push problem.


If you are an administrator of Gitlab service - trigger Housekeeping manually. It calls internally git gc or git repack.


Client-side solution

Other (hack, client-side only) solution is downloading last master without history:

git clone --single-branch --depth=1 git@my_server_url.com:my_repo_name

There is a chance that buffer overflow will not occur.

1

I had the same problem, I even tried to download the project directly from the website as a zip file but the download got interrupted at the exact same percent.

This single line fixed my problem like a charm

git config --global core.compression 0

I know other answers have mentioned this but, no one here mentioned that this line alone can fix the problem.

Hope it helps.

  • Same here, this fixed it, whereas the more complex solutions offered left me with an unusable (though probably fixable) clone. – Ron HD Jan 21 '21 at 17:17
0

From a git clone, I was getting:

error: inflate: data stream error (unknown compression method)
fatal: serious inflate inconsistency
fatal: index-pack failed

After rebooting my machine, I was able to clone the repo fine.

Paul Sturgess
  • 3,124
  • 2
  • 20
  • 22
  • The first time, I can't believe you just rebooting your machine can fix this problem, but I tried all I got messages that can't work. so I decided to reboot my machine is my last solution for me. lucky for me, when the machine starts I try to clone again. I can't believe it. That's works!!!!!!! – Thxopen Jun 14 '20 at 13:10
0

I turned off all the downloads I was doing in the meantime, which freed some space probably and cleared up/down bandwidth

Bartłomiej Wach
  • 1,920
  • 1
  • 10
  • 17
0

The git-daemon issue seems to have been resolved in v2.17.0 (verified with a non working v2.16.2.1). I.e. workaround of selecting text in console to "lock output buffer" should no longer be required.

From https://github.com/git/git/blob/v2.17.0/Documentation/RelNotes/2.17.0.txt:

  • Assorted fixes to "git daemon". (merge ed15e58efe jk/daemon-fixes later to maint).
GreenMoose
  • 331
  • 1
  • 5
  • 6
0

Tried most of the answers here, I got the error with the PUTTY SSH Client with all possible constellations.

Once I switched to OpenSSH the error was gone (remove the Environment Variable GIT_SSH and restart the git bash).

I was using a new machine and newest git versions. On many other/older machines (AWS as well) it did work as expected with PUTTY as well without any git configuration.

Max
  • 1,372
  • 4
  • 15
  • 32
0

I've experience the same problem. The REPO was too big to be downloaded via SSH. Just like @elin3t recommended, I've cloned over HTTP/HTTPS and change the REMOTE URL in .git/config to use the SSH REPO.

Rodel
  • 77
  • 6
0

I got the same issue as below when I run git pull

remote: Counting objects: 149, done.
Connection to git-codecommit.us-east-1.amazonaws.com closed by remote host.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

Then I checked the git status, There were so many uncommitted changes I fixed the issue by committing and push all the uncommitted changes.

Kiran Reddy
  • 634
  • 11
  • 26
0

None of the solutions above worked for me.

The solution that finally worked for me was switching SSH client. GIT_SSH environment variable was set to the OpenSSH provided by Windows Server 2019. Version 7.7.2.1

C:\Windows\System32\OpenSSH\ssh.exe

I simply installed putty, 0.72

choco install putty

And changed GIT_SSH to

C:\ProgramData\chocolatey\lib\putty.portable\tools\PLINK.EXE

heck1
  • 687
  • 5
  • 18
careri
  • 41
  • 4
0

I tried pretty much all the suggestions made here but none worked. For us the issue was temperamental and became worse and worse the larger the repos became (on our Jenkins Windows build slave).

It ended up being the version of ssh being used by git. Git was configured to use some version of Open SSH, specified in the users .gitconfig file via the core.sshCommand variable. Removing that line fixed it. I believe this is because Windows now ships with a more reliable / compatible version of SSH which gets used by default.

aatwo
  • 734
  • 5
  • 9
0

In my case, I simply upgraded my version of OpenSSL. The older versions of OpenSSL have vulnerabilities and also do not have the latest algorithms which may be needed. As of today, the command openssl version shows OpenSSL 1.1.1f 31 Mar 2020.

Michael Behrens
  • 460
  • 2
  • 6
0

I have tried for several times after I set git buffer, as I mentioned in the question, it seems work now.

So if you met this error, run this command:

git config --global http.postBuffer 2M

and then try again for some times.

Reference:

git push error: RPC failed; result=56, HTTP code = 0

Akbar Asghari
  • 387
  • 3
  • 12
0

Network quality matters, try to switch to a different network. What helped me was changing my Internet connection from Virgin Media high speed land-based broadband to a hotspot on my phone.

Before that I tried the accepted answer to limit clone size, tried switching between 64 and 32 bit versions, tried disabling the git file cache, none of them helped.

Then I switched to the connection via my mobile, and the first step (git clone --depth 1 <repo_URI>) succeeded. Switched back to my broadband, but the next step (git fetch --unshallow) also failed. So I deleted the code cloned so far, switched to the mobile network tried again the default way (git clone <repo_URI>) and it succeeded without any issues.

balintn
  • 229
  • 1
  • 3
  • 11
0

Although not exactly the same setup, but I had this issue on an nfs share mounted on Ubuntu 20.04. I haven't found any solution so I share how I solved it, hoping that I can help someone.

The error message was (sometimes with/without the warning):

warning: die() called many times. Recursion error or racy threaded death!
fatal: premature end of pack file, 29 bytes missing
fatal: premature end of pack file, 24 bytes missing
fatal: index-pack failed

Git shallow clone, disabling compression, etc. didn't solve the issue.

When I mounted the share with nfsvers=4.2 instead of nfsvers=4.0, the problem disappeared.

lp_
  • 1,128
  • 1
  • 14
  • 21
0

The below step is working perfectly for me.

enter image description here

git clone --depth 1 https://github.com/user/rep.git

Faisal Ahmed
  • 298
  • 2
  • 8
-1

This worked for me, setting up Googles nameserver because no standard nameserver was specified, followed by restarting networking:

sudo echo "dns-nameservers 8.8.8.8" >> /etc/network/interfaces && sudo ifdown venet0:0 && sudo ifup venet0:0
Luca Steeb
  • 1,643
  • 3
  • 22
  • 41
-1

If you're on Windows, you may want to check git clone fails with "index-pack" failed?.

Basically, after running your git.exe daemon ... command, select some text from that console window. Retry pulling/cloning, it might just work now!

See this answer for more info.

user276648
  • 5,199
  • 5
  • 51
  • 79
-2

Make sure your drive has enough space left

IndieTech Solutions
  • 2,429
  • 1
  • 18
  • 31
-4

None of these worked for me, but using Heroku's built in tool did the trick.

heroku git:clone -a myapp

Documentation here: https://devcenter.heroku.com/articles/git-clone-heroku-app

jpadvo
  • 4,535
  • 3
  • 24
  • 29