2015-09-03 56 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

謝謝它適合我 –