2015-09-03 52 views
1

我使用这个网址中的package.json的依赖关系安装使用HTTPS权限错误私人混帐回购协议中的package.json为NPM使用https协议

<private repo>:"git+https://<token>:[email protected]/<org>/<private repo>" 

而且我已经试过这一个

<private repo>:"git+https://<token>:[email protected]/<org>/<private repo>.git" 

只添加git的末

而且我知道令牌是有效Becz

当我在克隆终端使用此指令低于此回购工作的罚款

git clone https://<token>:[email protected]/<org>/<private repo>.git 

所以我得到的错误是这样,即使我不使用ssh protocole

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. 

而且我通过选择示波器创建此令牌read:org,write:org

回答

2

检查您的NPM版本(npm -v)。 NPM 2.7.4(可能是2.7.5)中存在一个导致私人回购失败的克隆错误。

请参见:https://github.com/nodejs/node/issues/1323

我就遇到了这个今天安装了2.7.4。我更新了最新的nodejs,这导致了NPM 2.11.3的下载,并且我可以通过令牌获得git + https的私人回购。

+0

谢谢它适合我 –