首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法安装DefinitelyTyped Typescript定义。获取“权限被拒绝(Publickey)”。通过npm

无法安装DefinitelyTyped Typescript定义。获取“权限被拒绝(Publickey)”。通过npm
EN

Stack Overflow用户
提问于 2017-10-19 16:53:22
回答 1查看 251关注 0票数 0

我目前正在尝试安装DefinitelyTyped代码库中的bleno类型定义。我使用的命令是

代码语言:javascript
复制
npm install --save @types/bleno

但似乎我不被允许克隆回购。

代码语言:javascript
复制
npm WARN package.json BluetoothServer@0.0.1 No repository field.
npm WARN package.json BluetoothServer@0.0.1 No README data
npm ERR! git clone git@github.com:types/bleno Cloning into bare 
repository '/root/.npm/_git-remotes/git-github-com-types-bleno-
71caf4ab'...
npm ERR! git clone git@github.com:types/bleno Permission denied 
(publickey).
npm ERR! git clone git@github.com:types/bleno fatal: Could not read 
from remote repository.
npm ERR! git clone git@github.com:types/bleno 
npm ERR! git clone git@github.com:types/bleno Please make sure you have 
the correct access rights
npm ERR! git clone git@github.com:types/bleno and the repository 
exists.
npm ERR! addLocal Could not install types/bleno
npm ERR! Error: ENOENT: no such file or directory, stat 'types/bleno'
npm ERR!     at Error (native)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 4.9.41-v7+     
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save" 
"@types/bleno"
npm ERR! cwd /home/nils/BluetoothServer
npm ERR! node -v v4.8.2
npm ERR! npm -v 1.4.21
npm ERR! path types/bleno
npm ERR! syscall stat
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/nils/BluetoothServer/npm-debug.log 
npm ERR! not ok code 0

当然,我尝试使用sudo,并将ssh密钥添加到github,然后我可以通过

代码语言:javascript
复制
ssh -T git@github.com

但我的问题依然存在。我做错了什么?

EN

回答 1

Stack Overflow用户

发布于 2017-10-19 17:27:08

在花了一上午的时间试图解决这个问题之后,当然在询问之后不久,我找到了灵魂。我将npm升级到3.10.10版本,它工作正常,没有问题。

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

https://stackoverflow.com/questions/46826120

复制
相关文章

相似问题

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