1

I just installed Node/NPM/Yeoman on a fresh install of OS X 10.9.2. Xcode tools are all installed. I pulled down a repository of a current project and ran bower install to install dependencies. Output looks like this:

bower angular#1.2.6         not-cached git://github.com/angular/bower-angular.git#1.2.6
bower angular#1.2.6            resolve git://github.com/angular/bower-angular.git#1.2.6
bower json3#~3.2.6          not-cached git://github.com/bestiejs/json3.git#~3.2.6
bower json3#~3.2.6             resolve git://github.com/bestiejs/json3.git#~3.2.6
bower es5-shim#~2.1.0       not-cached git://github.com/es-shims/es5-shim.git#~2.1.0
bower es5-shim#~2.1.0          resolve git://github.com/es-shims/es5-shim.git#~2.1.0
bower jquery#~1.10.2        not-cached git://github.com/jquery/jquery.git#~1.10.2
bower jquery#~1.10.2           resolve git://github.com/jquery/jquery.git#~1.10.2
bower bootstrap#~3.0.3      not-cached git://github.com/twbs/bootstrap.git#~3.0.3
bower bootstrap#~3.0.3         resolve git://github.com/twbs/bootstrap.git#~3.0.3
bower angular-resource#1.2.6       not-cached git://github.com/angular/bower-angular-resource.git#1.2.6
bower angular-resource#1.2.6          resolve git://github.com/angular/bower-angular-resource.git#1.2.6
bower angular-route#1.2.6          not-cached git://github.com/angular/bower-angular-route.git#1.2.6
bower angular-route#1.2.6             resolve git://github.com/angular/bower-angular-route.git#1.2.6
bower angular-file-upload#0.4.1    not-cached git://github.com/nervgh/angular-file-upload.git#0.4.1
bower angular-file-upload#0.4.1       resolve git://github.com/nervgh/angular-file-upload.git#0.4.1
bower angular-mocks#1.2.6          not-cached git://github.com/angular/bower-angular-mocks.git#1.2.6
bower angular-mocks#1.2.6             resolve git://github.com/angular/bower-angular-mocks.git#1.2.6
bower angular-scenario#1.2.6       not-cached git://github.com/angular/bower-angular-scenario.git#1.2.6
bower angular-scenario#1.2.6          resolve git://github.com/angular/bower-angular-scenario.git#1.2.6
bower angular-mocks#1.2.6             ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/angular/bower-angular-mocks.git", exit code of #128

Additional error details:
fatal: Could not chdir to 'Y:/': No such file or directory

Interestingly, the package that the ECMDERR occurs on changes every time I run bower install, which seem to suggest that it isn't a particular package causing the error.

I have found several different instances of people having trouble with error #128 when cloning from behind a firewall. It has been suggested that this can be fixed by running git config --global url."https://".insteadOf git:// in order to tell git to use HTTPS as the protocol instead of git, but this hasn't fixed the issue for me. Even more confusing is the fatal: Could not chdir to 'Y:/': No such file or directory. I frankly don't know where this is coming from. It only seems to show up when I run certain git commands, such as ls-remote.

Also, I am able to manually clone via SSH or HTTPS successfully. This error only happens in Bower.

Does anyone have any suggestions for how to fix this? I have searched quite a bit and have been unable to find anything else mentioning it. Any help would be much appreciated!

Community
  • 1
  • 1
inerd89
  • 11
  • 1
  • 3
  • Turns out this has something to do with my project being located on a network drive mounted locally via `SMB`. When I copied the project locally and ran the command, it worked. I will need to look into a better way to access samba shares with Git. If anyone has any ideas, I'm definitely open to them. – inerd89 Mar 28 '14 at 22:34

4 Answers4

2

I also had this issue. The solution for me was to add to the repository config

[url "https://"]
    insteadOf = git://

the file is in YOUR_REPO/.git/config

not in the global config like:

git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
alknows
  • 1,972
  • 3
  • 22
  • 26
0

I just hit the same error trying out angular-seed.

However my solution was not to move the project to local disk (The project is already local). As a work around to the problems when running

npm install

I first installed the bower command and then used bower install directly to install the bower packages. With a cache clean in the middle for good measure.

sudo npm install -g bower
bower cache clean
bower install

Hopefully this will help ease the frustration for others.

lyallward
  • 405
  • 3
  • 8
0

Had the same issue for me adding

[url "https:"]
    insteadOf = git:

To YOUR_REPO/.git/config did the trick, https without the double forward slash

Timothy Mugayi
  • 1,449
  • 17
  • 11
0

This is Because in a Proxy Environment Http and Https are preferred, So instead of

"devDependencies": {

    "file-loader": "^0.8.4",
    "gh-pages": "git://github.com/markdalgleish/gh-pages#cli-message",

  }

Replace it with Https

"devDependencies": {

        "file-loader": "^0.8.4",
        "gh-pages": "Https://github.com/markdalgleish/gh-pages#cli-message",

      }

Or you Can Set it in your Repo Globally

Good Luck!!

Ignatius Andrew
  • 8,012
  • 3
  • 54
  • 54