npm install ignoring git config? git vs http #3337

slawrence opened this Issue Apr 11, 2013 · 4 comments


None yet
4 participants


My workstation is behind a firewall that blocks git://. I've tried various solutions documented here ( 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:// 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:// 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:// 
npm ERR! git clone git:// fatal: unable to connect to
npm ERR! git clone git://[0:]: errno=Connection timed out
npm ERR! Error: `git "clone" "--mirror" "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!     <>
npm ERR! or email it to:
npm ERR!     <>

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

Edit: formatting, gist

BTW this is the project's package.json I was trying to install:

The first dependency (di) uses the git protocol: git:// Shouldn't my git config override?

git config -l

vine77 commented May 20, 2014

See also #5257

@othiym23 othiym23 added the support label Oct 10, 2014

See my comment: #5257 (comment)


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