'npm install' 某些回购失败

'npm install' Failing on Certain Repos

我从 here 购买了一个 Angular/Bootstrap4 模板包来玩,但我没有通过 npm install 步骤。我下载了源代码并提取了他们拥有的 angular2seed 项目。在我的 npm install 上,我得到:

npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true 

config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:334:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:188:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:498:12)
npm WARN addRemoteGit  jh3y/whirl resetting remote C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-jh3y-whirl-git-91f99c8e because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:334:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:188:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:498:12)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:334:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:188:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:498:12)
npm WARN addRemoteGit  erikflowers/weather-icons resetting remote C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-erikflowers-weather-icons-git-0c0a2917 because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:334:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:188:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:498:12)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:334:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:188:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:498:12)
npm WARN addRemoteGit  krzysu/flot.tooltip resetting remote C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-krzysu-flot-tooltip-git-21128819 because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:334:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:188:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:498:12)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm WARN addRemoteGit  git://github.com/zefoy/angular2-color-picker.git#npm-package resetting remote C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-zefoy-angular2-color-picker-git-npm-package-e1e8256f because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm WARN deprecated ag-grid-ng2@8.0.0: ag-grid-ng2 is now deprecated - please use ag-grid-angular instead.
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/zefoy/angular2-color-picker.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-zefoy-angular2-color-picker-git-npm-package-e1e8256f: Cloning into bare repository 'C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-zefoy-angular2-color-picker-git-npm-package-e1e8256f'...
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/zefoy/angular2-color-picker.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-zefoy-angular2-color-picker-git-npm-package-e1e8256f: fatal: unable to connect to github.com:
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/zefoy/angular2-color-picker.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-zefoy-angular2-color-picker-git-npm-package-e1e8256f: github.com[0: 192.30.253.112]: errno=Invalid argument
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/zefoy/angular2-color-picker.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-zefoy-angular2-color-picker-git-npm-package-e1e8256f: github.com[1: 192.30.253.113]: errno=Invalid argument
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/jh3y/whirl.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-jh3y-whirl-git-91f99c8e: Cloning into bare repository 'C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-jh3y-whirl-git-91f99c8e'...
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/jh3y/whirl.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-jh3y-whirl-git-91f99c8e: fatal: unable to connect to github.com:
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/jh3y/whirl.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-jh3y-whirl-git-91f99c8e: github.com[0: 192.30.253.112]: errno=Invalid argument
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/jh3y/whirl.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-jh3y-whirl-git-91f99c8e: github.com[1: 192.30.253.113]: errno=Invalid argument
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/erikflowers/weather-icons.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-erikflowers-weather-icons-git-0c0a2917: Cloning into bare repository 'C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-erikflowers-weather-icons-git-0c0a2917'...
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/erikflowers/weather-icons.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-erikflowers-weather-icons-git-0c0a2917: fatal: unable to connect to github.com:
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/erikflowers/weather-icons.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-erikflowers-weather-icons-git-0c0a2917: github.com[0: 192.30.253.112]: errno=Invalid argument
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/erikflowers/weather-icons.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-erikflowers-weather-icons-git-0c0a2917: github.com[1: 192.30.253.113]: errno=Invalid argument
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/krzysu/flot.tooltip.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-krzysu-flot-tooltip-git-21128819: Cloning into bare repository 'C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-krzysu-flot-tooltip-git-21128819'...
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/krzysu/flot.tooltip.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-krzysu-flot-tooltip-git-21128819: fatal: unable to connect to github.com:
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/krzysu/flot.tooltip.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-krzysu-flot-tooltip-git-21128819: github.com[0: 192.30.253.112]: errno=Invalid argument
npm ERR! git clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/krzysu/flot.tooltip.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-krzysu-flot-tooltip-git-21128819: github.com[1: 192.30.253.113]: errno=Invalid argument
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\msobat\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v6.9.5
npm ERR! npm  v4.3.0
npm ERR! code 128

npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/zefoy/angular2-color-picker.git C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-zefoy-angular2-color-picker-git-npm-package-e1e8256f
npm ERR! Cloning into bare repository 'C:\Users\msobat\AppData\Roaming\npm-cache\_git-remotes\git-github-com-zefoy-angular2-color-picker-git-npm-package-e1e8256f'...
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.253.112]: errno=Invalid argument
npm ERR! github.com[1: 192.30.253.113]: errno=Invalid argument
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 install。有帮助吗?

this 堆栈问题上找到我的解决方案:

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