首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >角cli安装会产生ssh误差。

角cli安装会产生ssh误差。
EN

Stack Overflow用户
提问于 2017-10-10 16:45:52
回答 2查看 1.8K关注 0票数 5

安装角cli时:

代码语言:javascript
复制
npm -g install angular/cli

在节点8.6中产生此错误:

代码语言:javascript
复制
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/angular/cli.git
npm ERR! 
npm ERR! Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! 
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/user/.npm/_logs/2017-10-10T16_41_49_141Z-debug.log

更改为节点版本6.11.4将导致类似的错误:

代码语言:javascript
复制
npm ERR! git clone --template=/Users/user/.npm/_git-remotes/_templates --mirror git@github.com:angular/cli.git /Users/user/.npm/_git-remotes/git-github-com-angular-cli-git-05516032: Cloning into bare repository '/Users/user/.npm/_git-remotes/git-github-com-angular-cli-git-05516032'...
npm ERR! git clone --template=/Users/user/.npm/_git-remotes/_templates --mirror git@github.com:angular/cli.git /Users/user/.npm/_git-remotes/git-github-com-angular-cli-git-05516032: Warning: Permanently added the RSA host key for IP address '64:ff9b::c01e:fd71' to the list of known hosts.
npm ERR! git clone --template=/Users/user/.npm/_git-remotes/_templates --mirror git@github.com:angular/cli.git /Users/user/.npm/_git-remotes/git-github-com-angular-cli-git-05516032: Permission denied (publickey).
npm ERR! git clone --template=/Users/user/.npm/_git-remotes/_templates --mirror git@github.com:angular/cli.git /Users/user/.npm/_git-remotes/git-github-com-angular-cli-git-05516032: fatal: Could not read from remote repository.
npm ERR! git clone --template=/Users/user/.npm/_git-remotes/_templates --mirror git@github.com:angular/cli.git /Users/user/.npm/_git-remotes/git-github-com-angular-cli-git-05516032: 
npm ERR! git clone --template=/Users/user/.npm/_git-remotes/_templates --mirror git@github.com:angular/cli.git /Users/user/.npm/_git-remotes/git-github-com-angular-cli-git-05516032: Please make sure you have the correct access rights
npm ERR! git clone --template=/Users/user/.npm/_git-remotes/_templates --mirror git@github.com:angular/cli.git /Users/user/.npm/_git-remotes/git-github-com-angular-cli-git-05516032: and the repository exists.
npm ERR! Darwin 16.7.0
npm ERR! argv "/Users/user/.nvm/versions/node/v6.11.4/bin/node" "/Users/user/.nvm/versions/node/v6.11.4/bin/npm" "install" "-g" "angular/cli"
npm ERR! node v6.11.4
npm ERR! npm  v3.10.10
npm ERR! code 128

npm ERR! Command failed: git clone --template=/Users/user/.npm/_git-remotes/_templates --mirror git@github.com:angular/cli.git /Users/user/.npm/_git-remotes/git-github-com-angular-cli-git-05516032
npm ERR! Cloning into bare repository '/Users/user/.npm/_git-remotes/git-github-com-angular-cli-git-05516032'...
npm ERR! Warning: Permanently added the RSA host key for IP address '64:ff9b::c01e:fd71' to the list of known hosts.
npm ERR! Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
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!     /Users/user/npm-debug.log

这发生在我的Ubuntu服务器和我的本地MacBook上,它们都有有效的SSH密钥添加到我的Github帐户中。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-10-10 16:51:48

它应该是@angular/cli,因为angular/cli是一个不存在的npm包:

npm -g install @angular/cli

票数 5
EN

Stack Overflow用户

发布于 2017-10-10 17:01:11

正确的命令是: npm安装-g @ar角/cli您可以检查这个命令以启动您的应用程序:https://angular.io/guide/quickstart

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46671883

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档