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 status: 128 #50

Closed
D3CK3R opened this issue Sep 14, 2012 · 51 comments
Closed

Git status: 128 #50

D3CK3R opened this issue Sep 14, 2012 · 51 comments
Labels

Comments

@D3CK3R
Copy link

D3CK3R commented Sep 14, 2012

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
Copy link

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
Copy link

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
Copy link
Member

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

@timmywil
Copy link

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
Copy link

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
Copy link
Author

D3CK3R commented Sep 15, 2012

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

@D3CK3R
Copy link
Author

D3CK3R commented Sep 15, 2012

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
Copy link
Contributor

fat commented Sep 16, 2012

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
Copy link

dlindahl commented Nov 1, 2012

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
Copy link
Member

satazor commented Nov 2, 2012

@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
Copy link

remcoder commented Nov 8, 2012

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
Copy link
Member

satazor commented Nov 9, 2012

@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
Copy link
Member

satazor commented Nov 9, 2012

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

@sindresorhus
Copy link
Contributor

@satazor This is why we need better validation.

@remcoder
Copy link

remcoder commented Nov 9, 2012

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

@satazor
Copy link
Member

satazor commented Nov 9, 2012

@sindresorhus True

@ajaybeniwal
Copy link

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
Copy link

ghost commented Mar 4, 2013

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

and clear all content in cache folder.

@hushicai
Copy link

hushicai commented Mar 5, 2013

I just run 'bower cache-clean'!

@andvik
Copy link

andvik commented May 9, 2013

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
Copy link

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
Copy link

Brainux commented May 13, 2013

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
Copy link

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
Copy link

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.

mikeschuld pushed a commit to Foundant/fine-uploader that referenced this issue Jan 23, 2014
Apparently, bower has permissions issues with this:
bower/bower#50

The recommended fix is to use https urls.
@fantunes
Copy link

@renjithkv123 brilliant, that fixes everything. Thanks!

@JeanMeche
Copy link

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

@franz-josef-kaiser
Copy link

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
Copy link

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

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

@andreblumenau
Copy link

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

@TormodHystad
Copy link

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
Copy link

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

#mac only
rm -rf ~/.bower

@thiagocavaloti
Copy link

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

@hjmodha
Copy link

hjmodha commented Jun 8, 2015

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

@chotkos
Copy link

chotkos commented Jul 7, 2015

Thanks, this helped me :)

@maboiteaspam
Copy link

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
Copy link

esoyke commented May 10, 2016

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
Copy link

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

@pik
Copy link

pik commented Jul 18, 2016

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 ?

@venkatav
Copy link

after git config --global url."https://".insteadOf git:// this git push is not working for me.

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

No branches or pull requests