Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

while installing npm this error will be produced. #8229

Closed
BrindhaE opened this issue May 11, 2015 · 10 comments
Closed

while installing npm this error will be produced. #8229

BrindhaE opened this issue May 11, 2015 · 10 comments

Comments

@BrindhaE
Copy link

npm ERR! git clone git://github.com/isaacs/js-yaml Cloning into bare repository '/home/indix/.npm/_git-remotes/git-github-com-isaacs-js-yaml-8a831333'...
npm ERR! git clone git://github.com/isaacs/js-yaml fatal: unable to connect to github.com:
npm ERR! git clone git://github.com/isaacs/js-yaml github.com[0: 192.30.252.130]: errno=Connection timed out
npm ERR! Error: Command failed: Cloning into bare repository '/home/indix/.npm/_git-remotes/git-github-com-isaacs-js-yaml-8a831333'...
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.252.130]: errno=Connection timed out
npm ERR! 
npm ERR! 
npm ERR!     at ChildProcess.exithandler (child_process.js:637:15)
npm ERR!     at ChildProcess.EventEmitter.emit (events.js:98:17)
npm ERR!     at maybeClose (child_process.js:743:16)
npm ERR!     at Socket.<anonymous> (child_process.js:956:11)
npm ERR!     at Socket.EventEmitter.emit (events.js:95:17)
npm ERR!     at Pipe.close (net.js:466:12)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.16.0-30-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/indix/Desktop/ind9/firestar-service
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! code 128
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/indix/Desktop/ind9/firestar-service/npm-debug.log
npm ERR! not ok code 0
indix@D30:~/Desktop/ind9/firestar-service$ git cache clean
git: 'cache' is not a git command. See 'git --help'.
indix@D30:~/Desktop/ind9/firestar-service$ cache clean
No command 'cache' found, did you mean:
 Command 'ccache' from package 'ccache' (main)
cache: command not found
@thefourtheye
Copy link
Contributor

Are you behind a firewall? Most of the companies block the git protocol. You can try to force all the git requests to https requests, with something like this

git config --local url.https://github.com/.insteadOf git://github.com/

This command will make git use https://github.com/ if the url starts with git://github.com/

@kenany
Copy link
Contributor

kenany commented May 11, 2015

@BrindhaE +1 to what @thefourtheye said. Error log tells all:

npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.252.130]: errno=Connection timed out

Definitely looks like some internet connection issue on your end. For your own sanity I'd also like to recommend upgrading to the latest stable release of npm because 1.3 has not been supported for months now.

@BrindhaE
Copy link
Author

@thefourtheye Done with the thing which u asked to do. Eventhough getting same error.

@thefourtheye
Copy link
Contributor

@BrindhaE Can you show the actual commands you tried? Also, it would help if you can capture the result and post it in gist.github.com or something similar.

@BrindhaE
Copy link
Author

@thefourtheye First ran the command which u gave.

git config --local url.https://github.com/.insteadOf git://github.com/

Then ran npm install
After some time it produces result like,

npm WARN package.json firestar-core@0.1.159 No README data
npm WARN package.json path@0.11.14 path is also the name of a node core module.
npm ERR! git clone --template=/home/indix/.npm/_git-remotes/_templates --mirror git://github.com/isaacs/js-yaml.git /home/indix/.npm/_git-remotes/git-github-com-isaacs-js-yaml-git-dd3d7a8b: Cloning into bare repository '/home/indix/.npm/_git-remotes/git-github-com-isaacs-js-yaml-git-dd3d7a8b'...
npm ERR! git clone --template=/home/indix/.npm/_git-remotes/_templates --mirror git://github.com/isaacs/js-yaml.git /home/indix/.npm/_git-remotes/git-github-com-isaacs-js-yaml-git-dd3d7a8b: fatal: unable to connect to github.com:
npm ERR! git clone --template=/home/indix/.npm/_git-remotes/_templates --mirror git://github.com/isaacs/js-yaml.git /home/indix/.npm/_git-remotes/git-github-com-isaacs-js-yaml-git-dd3d7a8b: github.com[0: 192.30.252.131]: errno=Connection timed out
npm ERR! Linux 3.16.0-30-generic
npm ERR! argv "/home/indix/.nvm/versions/io.js/v2.0.1/bin/iojs" "/home/indix/.nvm/versions/io.js/v2.0.1/bin/npm" "install"
npm ERR! node v2.0.1
npm ERR! npm  v2.9.0
npm ERR! code 128

npm ERR! Command failed: git clone --template=/home/indix/.npm/_git-remotes/_templates --mirror git://github.com/isaacs/js-yaml.git /home/indix/.npm/_git-remotes/git-github-com-isaacs-js-yaml-git-dd3d7a8b
npm ERR! Cloning into bare repository '/home/indix/.npm/_git-remotes/git-github-com-isaacs-js-yaml-git-dd3d7a8b'...
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.252.131]: errno=Connection timed out
npm ERR! 
npm ERR! 
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/indix/Desktop/repo/firestar-service/npm-debug.log

@Reddy1985
Copy link

I have the same issue, can anybody provide a better solution.

@thebwt
Copy link

thebwt commented Jun 27, 2016

In the packages.json, change any references to git:// to https:// for right now. Not sure how auth would work. If you got working ssh/deploy keys you may be able to use that by instead changing the repo to the ssh+git:// stuff, but that will take more finagling.

@ebuildy
Copy link

ebuildy commented Jan 4, 2017

What about if you install a package that have dependency like this?

@legodude17
Copy link
Contributor

Try git config --local url.https://.insteadOf git://

@npm-robot
Copy link

We're closing this support issue as it has gone three days without activity. The npm CLI team itself does not provide support via this issue tracker, but we are happy when users help each other here. In our experience once a support issue goes dormant it's unlikely to get further activity. If you're still having problems, you may be better served by joining package.community and asking your question there.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants