【发布时间】:2017-01-16 02:52:09
【问题描述】:
当我尝试创建项目时,出现以下错误。 它似乎与网络有关,因为它只出现在公司网络中。 知道如何解决这个问题吗?
D:\Projects\aurelia>au new test3
。 . .
安装项目依赖项。 npm 错误! git克隆
--template=C:\Users\user\AppData\Roaming\npm-cache_git-r emotes_templates --mirror git://github.com/gulpjs/gulp.git
C:\Users\AppData\Roaming\npm-cache_git-remotes\git-github-com-gulpjs-gulp-git-4-0ecf98f08
:npm 错误! git克隆
--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 错误! git克隆
--template=C:\Users\user\AppData\Roaming\npm-cache_git-remotes_templates --mirror git@github.com:gulpjs/gulp.git
C:\Users\user\AppData\Roaming\npm-cache_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801:
更新
这是我运行 npm install 时得到的结果
如果我复制粘贴失败的 git 命令,我会得到:
错误:SSL 证书问题,验证 CA 证书是否正常。 详细信息:错误:14090086:SSL 例程:SSL3_GET_SERVER_CERTIFICATE:证书验证失败,而 访问https://github.com/gulpjs/gulp.git/info/refs 致命:HTTP 请求失败
更新
我将丢失的证书添加到 git,现在我可以成功地自行运行 git 命令。如果我运行npm install,我仍然会收到错误消息。
我也听从了@Andrew 的建议,修改了 git 配置文件。
【问题讨论】:
-
添加了一个答案,让我知道这是否真的适合你。如果没有,请在 Gitter (astoker) 上联系我,我可以尝试让您启动并运行。
标签: node.js git github npm aurelia