我最近在GitHub上建立了一个私人仓库。现在,当我尝试进行npm安装npm start
时,两个命令都不再起作用。对于npm install
我得到
J:\workspace\epimss\angular2\ts\com-epimss.ng2.ts>npm install
npm ERR! git fetch -a origin (https://github.com/floridoo/gulp-sourcemaps.git) fatal: unable to access 'https://githu
b.com/floridoo/gulp-sourcemaps.git/': Failed to connect to github.com port 443: Timed out
npm ERR! git fetch -a origin (https://github.com/SitePen/remap-istanbul.git) fatal: unable to access 'https://github.
com/SitePen/remap-istanbul.git/': Failed to connect to github.com port 443: Timed out
npm ERR! fetch failed https://registry.npmjs.org/gulp-atom-electron/-/gulp-atom-electron-1.6.1.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 23.235.39.162:443
npm ERR! fetch failed https://registry.npmjs.org/gulp-atom-electron/-/gulp-atom-electron-1.6.1.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 23.235.39.162:443
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "P:\\Program Files\\nodejs\\node.exe" "P:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "
install"
npm ERR! node v5.8.0
npm ERR! npm v3.7.3
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true fetch -a origin
npm ERR! fatal: unable to access 'https://github.com/floridoo/gulp-sourcemaps.git/': Failed to connect to github.com
port 443: Timed out
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! J:\workspace\epimss\angular2\ts\com-epimss.ng2.ts\npm-debug.log
我是github的新手,只是不明白github应该参与尝试进行npm安装或npm启动。
我正在使用带有默认git / github设置的Webstorm IDE。我使用能够提交并推送到私人仓库,但我不能再这样做了。
感谢任何帮助。感谢。
答案 0 :(得分:0)
如果因任何原因通过https访问GitHub失败,请先尝试检查这是否适用于ssh:
url."ssh://git@github.com/".insteadOf https://github.com/
这意味着npm模块对github执行的任何git提取都将使用ssh协议而不是https完成。