bower / bower

A package manager for the web
bower.io
MIT License
14.99k stars 1.85k forks source link

Git status: 128 #50

Closed D3CK3R closed 11 years ago

D3CK3R commented 11 years ago

Hey guys, just registered a new package a few minutes ago. When i want to install it, i'm getting an error "Git status: 128"

The package is 'underscore.string': git://github.com/epeli/underscore.string.git

The solution in issue #32 doesn't work for me.

Could you help with this? Thanks in advance!

timmywil commented 11 years ago

Same issue trying to register Sizzle. I must be doing something wrong.

bower cloning git://github.com/jquery/sizzle.git
bower cached git://github.com/jquery/sizzle.git
bower fetching sizzle
bower error Git status: 128
timmywil commented 11 years ago

Ah, my guess is that the url should be different for those who are owners of the repo. Seems to work for everybody besides Sizzle members. I wonder if this is a bigger issue that bower needs to address somehow. Perhaps the https protocol rather than the git one would work for everyone.

paulirish commented 11 years ago

Hmm.. Owner shouldn't matter at all, actually..

timmywil commented 11 years ago

Yea, I get the same error with all urls and combinations. From what I can find, 128 seems to be a permissions error. Regular git clone works fine tho.

timmywil commented 11 years ago

Well, I removed my bower cache and it works for me now. I don't know if that will help anyone. Perhaps bower didn't cache something correctly when I was registering sizzle.

#mac only
rm -rf ~/.bower
D3CK3R commented 11 years ago

Very nice, this also works for me. Will this be fixed in a future release?

D3CK3R commented 11 years ago

Hm, i've also registered angular-ui and installed the package. Everything works as expected, but the yeoman script ends up with "Git status: 127 " - 127 means "command not found" ... am i right?

fat commented 11 years ago

hm interesting… we will definitely be adding a -f flag in the future which does a hard reinstall and blows away your cache.

would be nice to know why you guys were getting the 128 tho

dlindahl commented 11 years ago

I also ran into this issue. I had previously installed the package with a full git URL.

I then registered the package and tried to reinstall it via bower's registry.

This is when I got the 128 error.

error: unable to write sha1 filename /Users/dlindahl/.bower/barcode_input/.git/objects/pack/pack-96e63e79ad3802064c429e7443b9eae4f0dd8b7b.pack: No such file or directory

fatal: cannot store pack file

fatal: index-pack failed

bower error Git status: 128

I then manually cleared my cache at ~/.bower as suggested and tried again.

This time I got the error:

bower copying /Users/dlindahl/.bower/barcode_input

events.js:68
        throw arguments[1]; // Unhandled 'error' event
                   ^
Error: ENOENT, open '/var/folders/5V/5VYhoyUTGKiqL+FlYJyHRk+++TM/-Tmp-/tmp-40658nvawp8w/.git/hooks/post-receive.sample'

Just for laughs, I re-ran the installation and it exited cleanly.

Thinking that was odd, I manually cleared the cache again and tried to reinstall.

Everything installed correctly this time and bower exited cleanly.

I'm only posting this in case someone else runs into the same series of events and it proves useful to someone.

satazor commented 11 years ago

@dlindahl it seems you are using an old version of bower. You now got a -f flag, a new cache clean command and a new cache strategy.

remcoder commented 11 years ago

Still unresolved as of version 0.3.2. I just registered a package ('konami'). I was able to install it once. All other attempts after that, both on windows and mac result in code 128. I tried both rm -rf ~/.bower and bower cache-clean to no avail.

satazor commented 11 years ago

@remcoder The url you registered is wrong.

You registered with: git://github.com:remcoder/konami.git I'll change it to: git://github.com/remcoder/konami.git

satazor commented 11 years ago

@remcoder Should be changed, can you please check if it works?

sindresorhus commented 11 years ago

@satazor This is why we need better validation.

remcoder commented 11 years ago

oh sorry, my bad. Indeed it works now! Thx.

satazor commented 11 years ago

@sindresorhus True

ajaybeniwal commented 11 years ago

I was facing the same problem on windows .But i ran command bower cache-clean and i was able to install angular.js using bower properly

ghost commented 11 years ago

Under windows goto: C:\Users\AppData\Roaming\bower\cache\

and clear all content in cache folder.

hushicai commented 11 years ago

I just run 'bower cache-clean'!

andvik commented 11 years ago

i still get status 128 when trying to install requirejs. I also tried doing a fresh install of bower, as well as cleaning my cache. Still giving me the 128 error.

what I run:

bower install requirejs

what I get:

bower cloning git://github.com/jrburke/requirejs
bower caching git://github.com/jrburke/requirejs
bower error status code of git: 128

There were errors, here's a summary of them:
- requirejs status code of git: 128
fata: unable to connect to github.com:
github.com[0: 204.232.175.90] errno= No error

I am running Windows 7

davisford commented 11 years ago

EDIT ok, I realized my problem. I was having the same exact issue with the status 128, unable to connect to github.com, etc. I realized I'm on WiFi, and one of the access points explicitly blocks port 22. My adapter had switched, and that was the reason. Switched it back to open WiFi and voila, works again. Just another data point to consider if you're getting this error...check your network, man.

Brainux commented 11 years ago

Hello guys I´d thinking about comments and davsford, he is correct. Bower uses git:// by default so I just get the URL with https:// provided on page of each project inside of zip button for download.

root@labntiX:~# bower install https://github.com/yeoman/stringify-object.git bower cloning https://github.com/yeoman/stringify-object.git bower caching https://github.com/yeoman/stringify-object.git bower fetching stringify-object bower checking out stringify-object#0.1.3 bower warn Package stringify-object is still using the deprecated "component.json" file bower copying /root/.bower/cache/stringify-object/71340b9c4891690500ab7e6cc5ee0866 bower installing stringify-object#0.1.3 root@labntiX:~# bower install https://github.com/blueimp/jQuery-File-Upload.git bower cloning https://github.com/blueimp/jQuery-File-Upload.git bower caching https://github.com/blueimp/jQuery-File-Upload.git bower fetching jQuery-File-Upload bower checking out jQuery-File-Upload#8.1.0 bower copying /root/.bower/cache/jQuery-File-Upload/8f1a2144e5c532c8357197e9c60a1fee bower installing jQuery-File-Upload#8.1.0

It´s working fine now!

jcumminsr1 commented 11 years ago

I came across this problem while using the Angular generator on my university Wifi network. It was driving me nuts until I found the suggestion by @davisford . I am now at home and magically bower works just fine. There is a workaround that makes git always use https (source):

git config --global url."https://".insteadOf git://
marcoslhc commented 11 years ago

Hi. I've checked my WiFi AP and the port 22 is open. The port seems open in the firewall too (i'm using the default mac firewall) but I still get the same error. I used the workaround posted by @jcumminsr1 and everything worked out fine, but IMO not using the git native protocol feels wrong.

andvik commented 11 years ago

@jcumminsr1 - I used the workaround and now it works :) chances are that its the firewall settings at work. But yea, thats a good workaround for people who still experience this problem.

marcoslhc commented 11 years ago

I've shut down the firewall and the error still came up.

The thing is why is this issue closed if the error still shows up? The workaround is fine while the issue get solved, but I don't think developers should change the git global configuration just because Bower doesn't get along with git:// protocol. If the case is Bower works with https:// only then the installer should make sure https:// is used in that particular git instance. It should be transparent to the user.

I don't know if I'm explaining myself right but it makes sense to me.

jcumminsr1 commented 11 years ago

I completely agree. A 'use https' flag seems like it would be one way to do it. Another way would be a fallback method. On the first clone that fails using git, bower could try https, only if that clone then succeeds then it would set the 'use https' flag for the rest of the batch.

On Thursday, May 23, 2013, Marcos Hernández wrote:

I've shut down the firewall and the error still came up.

The thing is why is this issue closed if the error still shows up? The workaround is fine while the issue get solved, but I don't think developers should change the git global configuration just because Bower doesn't get along with git:// protocol. If the case is Bower works with https:// only then the installer should make sure https:// is used in that particular git instance.

I don't know if I'm explaining myself right but it makes sense to me.

— Reply to this email directly or view it on GitHubhttps://github.com/bower/bower/issues/50#issuecomment-18379325 .

Jim Cummins Front End Developer Intern relationship | one

OFFICE: 763.355.1025 DIRECT: 763.555.1025 ext. 121 www.relationshipone.com

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

Danita commented 11 years ago

I'm on Windows 7 (64-bit) using git bash. I've already tried @jcumminsr1 solution and it worked for a while, but it seems that sporadically I still get that "128" error back. I'm working on a very large enterprise network, and messing with the firewall settings is received with much reluctancy, so it would be really useful to have the option to specify which protocol to use.

mirontoli commented 11 years ago

I had this issue when I had bower installed in an app (locally). When I uninstalled it and installed it globally, the problem was gone: npm uninstall bower npm install -g bower

Maybe it helps somebody.

rbellamy commented 11 years ago

I used the global git config change suggested @jcumminsr1, informed by the suggestions by @davisford. I had tried the cache cleaning and the uninstalling/reinstalling of bower to no effect.

git config --global url."http://".insteadOf git://

Here's a snapshot of my session:

[root@xxx Development]# bower install
bower cloning git://github.com/Modernizr/Modernizr.git
bower caching git://github.com/Modernizr/Modernizr.git
bower cloning git://github.com/components/jquery.git
bower cloning git://github.com/jrburke/requirejs
bower cloning git://github.com/jlong/sass-twitter-bootstrap.git
bower caching git://github.com/components/jquery.git
bower caching git://github.com/jrburke/requirejs
bower caching git://github.com/jlong/sass-twitter-bootstrap.git
bower error status code of git: 128
bower error status code of git: 128
bower error status code of git: 128
bower error status code of git: 128

There were errors, here's a summary of them:
- modernizr status code of git: 128
fatal: unable to connect to github.com:
github.com[0: 204.232.175.90]: errno=Connection timed out

- jquery status code of git: 128
fatal: unable to connect to github.com:
github.com[0: 204.232.175.90]: errno=Connection timed out

- requirejs status code of git: 128
fatal: unable to connect to github.com:
github.com[0: 204.232.175.90]: errno=Connection timed out

- sass-bootstrap status code of git: 128
fatal: unable to connect to github.com:
github.com[0: 204.232.175.90]: errno=Connection timed out

[root@xxx Development]# git config --global url."http://".insteadOf git://
[root@xxx Development]# bower cache-clean
bower completion cleared completion cache
bower cache cleared jquery
bower cache cleared modernizr
bower cache cleared requirejs
bower cache cleared sass-bootstrap
[root@aergo Development]# bower install
bower cloning git://github.com/jlong/sass-twitter-bootstrap.git
bower caching git://github.com/jlong/sass-twitter-bootstrap.git
bower cloning git://github.com/components/jquery.git
bower caching git://github.com/components/jquery.git
bower cloning git://github.com/Modernizr/Modernizr.git
bower cloning git://github.com/jrburke/requirejs
bower caching git://github.com/Modernizr/Modernizr.git
bower caching git://github.com/jrburke/requirejs
bower fetching jquery
bower checking out jquery#1.9.1
bower warn Package jquery is still using the deprecated "component.json" file
bower copying /root/.bower/cache/jquery/29cb4373d29144ca260ac7c3997f4381
bower fetching requirejs
bower checking out requirejs#2.1.6
bower copying /root/.bower/cache/requirejs/ca377b0e482cd657ed20ebfa063ade1a
bower fetching modernizr
bower fetching sass-bootstrap
bower checking out modernizr#v2.6.2
bower copying /root/.bower/cache/modernizr/49c1c17a4ec1b92db2a4728ece50773a
bower checking out sass-bootstrap#v2.3.2
bower warn Package sass-bootstrap is still using the deprecated "component.json" file
bower copying /root/.bower/cache/sass-bootstrap/f8004d3122cd19e478fcee627c9ad58e
bower cloning git://github.com/components/jquery.git
bower cached git://github.com/components/jquery.git
bower fetching jquery
bower checking out jquery#2.0.2
bower copying /root/.bower/cache/jquery/29cb4373d29144ca260ac7c3997f4381
bower installing jquery#1.9.1
bower installing requirejs#2.1.6
bower installing modernizr#2.6.2
bower installing sass-bootstrap#2.3.2
[root@xxx Development]#
jcumminsr1 commented 11 years ago

@rbellamy Is this on a network that you control? If so, is there any firewall that you're using?

rbellamy commented 11 years ago

@jcumminsr1 It's in an Amazon VPC on an EC2 instance.

whitneyland commented 10 years ago

First time user of bower and I'm hitting bunch of issues like this one. Why not just document these in the readme until someone has time to address?

Btw, in my case clearing the cache fixed it. But why, it was my first time installing?

claydiffrient commented 10 years ago

Using the global replace worked, but shouldn't there be a way to make bower go that way without needing to change the global git configuration?

afonso-praca commented 10 years ago

I had this issue when I had bower installed in an app (locally). When I uninstalled it and installed it globally, the problem was gone:

npm uninstall bower npm install -g bower

ghost commented 10 years ago

try this on console:

git config --global url."https://".insteadOf git://

This works for me

fantunes commented 10 years ago

@renjithkv123 brilliant, that fixes everything. Thanks!

JeanMeche commented 10 years ago

Deleting C:\user\AppData\Roaming\bower\cache did it for me.

franz-josef-kaiser commented 10 years ago

I came around that issue while searching for the Git error code 128 for a Vagrant/Puppet/Git stack (no bower in there). What I noticed: It only happens when the directory already is in place, therefore clearing the referenced cache works. It seems that it is neither a git:// vs. https:// or unauthenticated request nor a port issue. Btw, I run git version 1.7.9.5 just FYI. Hope this helps someone who stumbles upon it.

Edit: For later readers: Make sure you are providing credentials when using git:// or git@ pointers. Also check your SSH keys.

saurabh-agrawal83 commented 10 years ago

@jcumminsr1 - thanks for the tip. git config worked for me

git config --global url."https://".insteadOf git://

andreblumenau commented 9 years ago

@jcumminsr1 - thanks for the tip. git config worked for me[2]

TormodHystad commented 9 years ago

Make sure "telnet github.com 9418" from a command prompt works. If it doesn't, you have firewall issues. (I got the code 128 error on Windows, because of a corporate firewall)

AntonMaltsev commented 9 years ago

Thanks! Tip below helped! BTW not only on Mac, I'm on Windows

mac only

rm -rf ~/.bower

thiagocavaloti commented 9 years ago

like @renjithvincent said, git config --global url."https://".insteadOf git:// works for me too :+1:

hjmodha commented 9 years ago

thanks @renjithvincent, git config --global url."https://".insteadOf git:// worked for me

chotkos commented 8 years ago

Thanks, this helped me :)

maboiteaspam commented 8 years ago

faced the problem a moment ago,

bower -v 1.4.1

I was trying to install the module from a public github repo with bower i maboiteaspam/grunt-vid2pict --save

Even i m the owner, i got ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/maboiteaspam/grunt-vid2pic.git", exit code of #128 fatal: remote error: Repository not found. (this cmd never worked for me, btw)

I had to change for explicit http bower i https://github.com/maboiteaspam/grunt-vid2pict.git --save

The module would install.

I also tried bower cache clean before, but that did not help.

Maybe i did something wrong, only sharing.

esoyke commented 8 years ago

Maybe this will help someone someday, but also be sure you aren't simply using an old version of bower. I tried every solution here plus adding "strict-ssl": false, "https-proxy": "" to the .bowerrc, with no dice. Then I noticed the Windows box I had recently switched over to was running bower 1.4.1. Upgrading to 1.7.9 resolved it.

vkjangra1209 commented 8 years ago

git config --global url."https://".insteadOf git:// worked for me. thnx

pik commented 7 years ago

Same issue here, I'd like to note that e.g. git ls-remote git@github.com:User/a_private_repo.git resolves correctly even though the bower git ls-remote git://github.com/User/private_repo does not? Is this a git issue or the way bower is expanding the urls ?