npm install ignoring git config? git vs http #3337

Closed
slawrence opened this Issue Apr 11, 2013 · 4 comments

Comments

Projects
None yet
4 participants

Hi,

My workstation is behind a firewall that blocks git://. I've tried various solutions documented here (http://stackoverflow.com/questions/15903275/git-is-blocked-how-to-install-npm-modules?lq=1). The one that "should" work is modifying my git configuration to replace all git:// calls with http://

After modifying gitconfig I verified that requests with git:// were properly replaced (ie git clone git://github.com/isaacs/npm.git works, where it didn't before)

However, despite modifying my ~/.gitconfig, npm installs still requests git repos with the git:// protocol.

Is there a separate git configuration for npm?

npm ERR! git clone git://github.com/vojtajina/node-di.git Cloning into bare repository 'C:\Users\slawrence1\AppData\Roaming\npm-cache\_git-remotes\git-github-com-vojtajina-node-di-git-7bfbbcae'...
npm ERR! git clone git://github.com/vojtajina/node-di.git 
npm ERR! git clone git://github.com/vojtajina/node-di.git fatal: unable to connect to github.com:
npm ERR! git clone git://github.com/vojtajina/node-di.git github.com[0: 204.232.175.90]: errno=Connection timed out
npm ERR! Error: `git "clone" "--mirror" "git://github.com/vojtajina/node-di.git" "C:\\Users\\slawrence1\\AppData\\Roaming\\npm-cache\\_git-remotes\\git-github-com-vojtajina-node-di-git-7bfbbcae"` failed with 128
npm ERR!     at ChildProcess.<anonymous> (C:\Users\slawrence1\AppData\Roaming\npm\node_modules\npm\lib\utils\exec.js:59:20)
npm ERR!     at ChildProcess.EventEmitter.emit (events.js:99:17)
npm ERR!     at maybeClose (child_process.js:638:16)
npm ERR!     at Process._handle.onexit (child_process.js:680:5)
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 Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\slawrence1\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "karma@canary"
npm ERR! cwd C:\dev\svn\pe2e.trunk\pe2e\pe2e-web\webapp
npm ERR! node -v v0.8.18
npm ERR! npm -v 1.2.17
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     C:\dev\svn\pe2e.trunk\pe2e\pe2e-web\webapp\npm-debug.log
npm ERR! not ok code 0

npm-debug.log: https://gist.github.com/slawrence/5364061
Edit: formatting, gist

BTW this is the project's package.json I was trying to install: https://github.com/karma-runner/karma/blob/master/package.json.

The first dependency (di) uses the git protocol: git://github.com/vojtajina/node-di.git. Shouldn't my git config override?

git config -l
url.http://.insteadof=git://

vine77 commented May 20, 2014

See also #5257

@othiym23 othiym23 added the support label Oct 10, 2014

See my comment: #5257 (comment)

Contributor

othiym23 commented Oct 27, 2014

This is in fact a duplicate of #5257, so I'm closing it as such. Keep an eye on that for the eventual resolution to this, although @LaurentGoderre's workaround will make life much easier until then.

@othiym23 othiym23 closed this Oct 27, 2014

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