2017-10-10 91 views
2

与安装角度CLI:角CLI安装收率SSH错误

npm -g install angular/cli 

息率此误差与节点8.6:

npm ERR! Error while executing: 
npm ERR! /usr/bin/git ls-remote -h -t ssh://[email protected]/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 yeilds类似的错误:

npm ERR! git clone --template=/Users/user/.npm/_git-remotes/_templates --mirror [email protected]: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 [email protected]: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 [email protected]: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 [email protected]: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 [email protected]: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 [email protected]: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 [email protected]: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 [email protected]: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帐户。

回答