NPM更新错误 – 无法执行GIT
当我尝试创build一个项目时,我得到下面的错误。 这似乎是networking相关的,因为它只发生在公司networking。 任何想法如何解决这个问题?
D:\ Projects \ aurelia> au new test3
。 。 。
安装项目依赖关系。 npm ERR! git clone
–template = C:\ Users \ user \ AppData \ Roaming \ npm-cache_git -r emotes_templates –mirror git://github.com/gulpjs/gulp.git
C:\用户\应用程序数据\漫游\ NPM-cache_git,遥控器\混帐github上-COM-gulpjs-一饮而尽,混帐4-0ecf98f08
:npm ERR! git clone
–template = C:\ Users \ user \ AppData \ Roaming \ npm-cache_git-remotes_templates –mirror https://github.com/gulpjs/gulp.git
C:\ Users \ user \ AppData \ Roaming \ npm-cache_git-remotes \ git-https-github-com-gulpjs-gulp-git-40-4b46db44:npm ERR! git clone
–template = C:\ Users \ user \ AppData \ Roaming \ npm-cache_git-remotes_templates –mirror git@github.com:gulpjs / gulp.git
C:\用户\用户\应用程序数据\漫游\ NPM-cache_git-遥控\ GIT-github上-COM-gulpjs-吞-GIT-4-0-7c06e801:
UPDATE
这是我运行npm install
时得到的
如果我复制粘贴失败的git命令,我得到这个:
错误:SSL证书问题,请validationCA证书是否正确。 详细信息:错误:14090086:SSL例程:SSL3_GET_SERVER_CERTIFICATE:访问https://github.com/gulpjs/gulp.git/info/refs时证书validation失败fatal:HTTP请求失败
UPDATE
我将缺less的证书添加到git中,现在我可以成功运行git命令。 如果我运行npm install
我仍然得到一个错误。 我也遵循@Andrew的build议,并修改了gitconfiguration文件。
尝试configuration你的git使用https而不是git。 这似乎在工作networking中更频繁地工作。
在控制台中键入以下命令:
git config --global url."https://".insteadOf git://
然后你可以尝试再次创build项目,或者只要运行npm install
如果它已经被创build,并且在依赖项检索步骤失败。
此外,如果这不起作用 ,你可能需要进一步指定npm使用git与ssh。 在这种情况下,运行以下命令: git config --global url."https://github.com/".insteadOf git@github.com: