1

When I try to execute ember new myproject I get the following:

[ ... snip ...]
  create vendor/.gitkeep
Installed packages for tooling via npm.
Failed to execute "git ls-remote --tags --heads git://github.com/stefanpenner/ember-load-initializers.git", exit code of #128
Error: Failed to execute "git ls-remote --tags --heads git://github.com/stefanpenner/ember-load-initializers.git"
 exit code of #128
    at createError (/usr/local/lib/node_modules/ember-cli/node_modules/bower/lib/util/createError.js:4:15)
    [ ... snip ...]

So I tried to execute the failing command:

$ git ls-remote --tags --heads git://github.com/stefanpenner/ember-load-initializers.git
fatal: unable to connect to github.com:
github.com[0: 192.30.252.131]: errno=Operation timed out

The git://github.com syntax was new to me, so I tried a version with the more familiar git@github.com::

$ git ls-remote --tags --heads git@github.com:stefanpenner/ember-load-initializers.git                                                                                        
3a6dc87e29efc9de4bc42b6f9afedabb000bcc89        refs/heads/master
be13fa4a45abff2c9fcfc82497668ed2a925a856        refs/tags/0.0.1
3a6dc87e29efc9de4bc42b6f9afedabb000bcc89        refs/tags/v0.0.2
$

Can anyone help me diagnose this issue? I'd be happy with a git solutionor anember` workaround.

Edit:

I have tried:

$ ember new myproject --skip-git

with the same result. I've also tried

$ ember new myproject --skip-bower

which seems to compete successfully, but then give an error on $ ember serve, complaining about the lack of bower components.

If I then try:

$ bower install

Then I get the same git:// problem. So I guess this is really a bower/git problem. Still appreciate suggestions.

Eric Wilson
  • 57,719
  • 77
  • 200
  • 270

4 Answers4

3

This tends to be issue with firewalls. Verify your firewall will let you through to the git:// domain. When I run the command I get

$ git ls-remote --tags --heads git://github.com/stefanpenner/ember-load-initializers.git
3a6dc87e29efc9de4bc42b6f9afedabb000bcc89        refs/heads/master
be13fa4a45abff2c9fcfc82497668ed2a925a856        refs/tags/0.0.1
3a6dc87e29efc9de4bc42b6f9afedabb000bcc89        refs/tags/v0.0.2
jakecraige
  • 2,707
  • 4
  • 21
  • 25
  • I guess you could say that I've verified that I can't get through to git://. The question is: what to do about it? – Eric Wilson Oct 28 '14 at 17:00
  • This is generally a firewall issue. If you are within an office that has one you may need to have that opened up. This comes from ember using dependencies from github directly in the package.json – jakecraige Oct 28 '14 at 17:05
  • 2
    You may be able to fix by this comment: https://github.com/stefanpenner/ember-cli/issues/773#issuecomment-43570471 – jakecraige Oct 28 '14 at 17:06
  • Good suggestion. I exited my companies VPN, and it works now. This is a personal project, I had entered the VPN out of habit, so that's a good enough solution for me, though the issue you link to looks like a better solution. – Eric Wilson Oct 28 '14 at 17:10
3

I had the same problem and solved it by explicitly adding empty proxy settings to .bowerrc

$ ember new myproject --skip-bower

Then I edited the .bowerrc inside the project to look like this:

{
  "directory": "bower_components",
  "analytics": false,
  "proxy":"",
  "https-proxy":""
}

And finally did a

$ bower install

which worked fine then.

zeitgeist
  • 31
  • 3
0

Check this out: git:// protocol blocked by company, how can I get around that?

So, to answer your question:

 $ git ls-remote --tags --heads git://github.com/stefanpenner/ember-load-initializers.git
 ...Connection timed out
 $ git config --global url."https://".insteadOf git://
 $ git ls-remote --tags --heads git://github.com/stefanpenner/ember-load-initializers.git
2ac2abfa69f9ea682a7461fd6c46a96a56c276fd    refs/heads/master
be13fa4a45abff2c9fcfc82497668ed2a925a856    refs/tags/0.0.1
3a6dc87e29efc9de4bc42b6f9afedabb000bcc89    refs/tags/v0.0.2

One might argue that opening outgoing connections to port TCP 9148 would be the better solution, but this is SO. Not that rogue nation known as ServerFault

(I kid: https://serverfault.com/questions/189070/what-firewall-ports-need-to-be-open-to-allow-access-to-external-git-repositories )

Community
  • 1
  • 1
FlipMcF
  • 12,636
  • 2
  • 35
  • 44
  • thanks for asking. My work computer will now deal with 'git://' addresses without opening port TCP 9418 – FlipMcF Dec 19 '14 at 23:47
-1

You use the --skip-git argument if you have problems with, and take care of versioning later by hand.

See also: $ ember help new

zeppelin
  • 1,134
  • 8
  • 10