Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git clone early EOF error #54

Closed
DennisIDI opened this issue Jul 30, 2014 · 14 comments
Closed

git clone early EOF error #54

DennisIDI opened this issue Jul 30, 2014 · 14 comments

Comments

@DennisIDI
Copy link

We get this error when running : git clone git://private-bower:6789/angular-animate -b v1.2.21 --depth 1

Cloning into 'angular-animate'...
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 7 (delta 0), reused 3 (delta 0)
Receiving objects: 100% (7/7), 32.58 KiB | 0 bytes/s, done.
ffatal: read error: Invalid argument
atal: early EOF
fatal: index-pack failed

also when running bower install angular-animate, we get:

ECMDERR Failed to execute "git clone git://jsbuilder:6789/angular-animate -b v1.2.21 --progress . --depth 1", exit code of #128

@Hacklone
Copy link
Owner

Hacklone commented Aug 1, 2014

This seems like an issue with your git daemon, maybe some configuration on your server.
Could you try starting a git daemon manually on your server?
Just clone something to a folder, then start git daemon and then try to clone again something from your server.

@ciaranj
Copy link

ciaranj commented Sep 3, 2014

Windows client by any chance @DennisIDI ?

@DimitarChristoff
Copy link

confirmed on windows, get that here on Q - https://github.com/kriskowal/q - fails similarly on the clone of tag:

$ git clone git://WR8CK5W0:6789/q -b v1.0.1 --progress --depth 1
Cloning into 'q'...
remote: Counting objects: 53, done.
remote: Compressing objects: 100% (51/51), done.
fatal: read error: Invalid argument
fatal: early EOFs:  86% (46/53)
fatal: index-pack failed

doing the same on the original url works:

$ git clone https://github.com/kriskowal/q.git -b v1.0.1 --progress --depth 1
Cloning into 'q'...
remote: Counting objects: 53, done.
remote: Compressing objects: 100% (51/51), done.
emote: Total 53 (delta 2), reused 37 (delta 1)
Unpacking objects: 100% (53/53), done.
Checking connectivity... done.
Note: checking out '3f62d467cb55efe4e0f53fa880239ab5057990e8'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

The error is to do with git-daemon running out of memory. see top answer here: http://stackoverflow.com/questions/1943914/git-clone-fails-with-index-pack-failed

can be reproduced by just running the git daemon locally into the gitRepoCache folder via

git daemon --base-path=. --port=6789 --enable=receive-pack --informative-errors --verbose --export-all

@ciaranj
Copy link

ciaranj commented Oct 6, 2014

Indeed ;)

@Hacklone
Copy link
Owner

Hacklone commented Oct 6, 2014

Nice catch :)
Actually git daemon is not necessary so maybe we could make the use of git daemon optional (mainly for Windows users)
Anyway what about running private-bower as a windows service like described here: https://github.com/Hacklone/private-bower/wiki/Install%20as%20a%20Windows%20service
Did the issue still occur then?

@DimitarChristoff
Copy link

not an option for me, needs admin rights to install service. not running the daemon is also not a good option as it serves the following use case:

  • corporate firewall
  • clients w/o proxy settings can see the bower server
  • bower server gets and proxies all calls to local users who don't need to configure global proxy options / https over git:// etc.

fix locally into .gitconfig:

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

that is the maximum value (2gb) on a 32-bit system, 2048 is out of dange already - allows it all to work fine. I'd add it to documentation as a note for windows users. the [core] section does not seem to affect it much. Default is 128m for [pack] options.

obviously, no guarantee you won't run into a repo that has so many commit objects that it runs out of range again.

@Hacklone
Copy link
Owner

Hacklone commented Oct 6, 2014

We can also put a .gitconfig in the package repository folder because git takes local .gitconfig also in consideration

@Xiot
Copy link

Xiot commented Dec 23, 2014

I've been running into this one too. Strangely enough it seems to work fine on some repositories. I can successfully cache, and serve out the angularjs package (109 MB) however, a smaller package like uri.js fails with the early EOF error

@andham
Copy link

andham commented Feb 2, 2015

I'm also seeing this, e.g. for the angular-ui-date package.

Starting the git daemon manually as suggested by #DimitarChristoff, I don't see any errors reported by the daemon process. But the cloning still doesn't work.

@pjabang1
Copy link

I've seen this one too and opted to use the https protocol instead :
git config --global url."https://".insteadOf git://

@Hacklone
Copy link
Owner

Closing this due to inactivity.

@mancioshell
Copy link

@Hacklone i have the same issue. Your advice to address it is to disable git daemon.
How can i disable git daemon in private bower server?

@Hacklone
Copy link
Owner

There are several solutions here: http://stackoverflow.com/questions/1943914/git-clone-fails-with-index-pack-failed
git config pack.windowMemory 10m git config pack.packSizeLimit 20m worked for me :)

Hope this helps

@mancioshell
Copy link

Also with this configuration and that used by @DimitarChristoff doesn't work.
Even if i stop private-bower and execute git daemon directly in the gitRepoCache folder i have same issues:

git daemon --base-path=. --port=6789 --enable=receive-pack --informative-errors --verbose --export-all

I have this git version:
C:\PrivateBowerRepository>git --version
git version 2.7.0.windows.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants