Giter Club home page Giter Club logo

Comments (14)

Hacklone avatar Hacklone commented on September 12, 2024 1

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

from private-bower.

Hacklone avatar Hacklone commented on September 12, 2024

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.

from private-bower.

ciaranj avatar ciaranj commented on September 12, 2024

Windows client by any chance @DennisIDI ?

from private-bower.

DimitarChristoff avatar DimitarChristoff commented on September 12, 2024

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

from private-bower.

ciaranj avatar ciaranj commented on September 12, 2024

Indeed ;)

from private-bower.

Hacklone avatar Hacklone commented on September 12, 2024

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?

from private-bower.

DimitarChristoff avatar DimitarChristoff commented on September 12, 2024

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.

from private-bower.

Hacklone avatar Hacklone commented on September 12, 2024

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

from private-bower.

Xiot avatar Xiot commented on September 12, 2024

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

from private-bower.

andham avatar andham commented on September 12, 2024

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.

from private-bower.

pjabang1 avatar pjabang1 commented on September 12, 2024

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

from private-bower.

Hacklone avatar Hacklone commented on September 12, 2024

Closing this due to inactivity.

from private-bower.

mancioshell avatar mancioshell commented on September 12, 2024

@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?

from private-bower.

mancioshell avatar mancioshell commented on September 12, 2024

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

from private-bower.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.