我在我的package.json中有3个私有依赖。当我运行npm安装时,我得到错误。请注意,当我同DO克隆然后将其克隆ONLY NPM install不工作npm安装的私有依赖不起作用,但是克隆不起作用
Cloning into bare repository
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
整个日志低于目前。
很少有类似的问题相关,但他们都没有提供我的方案中的解决方案。最初我以为是nodejs和npm版本问题,所以我通过运行windows nodejs.msi更新了它们,目前版本如图所示。
我的package.json的内容是如下:(大部分被删除,只是将重要的私人依赖被提及)
"dependencies": {
"private-dep2": "git+ssh://[email protected]:reph/private-dep2.git#v0.3.5"
},
"devDependencies": {
"ember-cli": "0.2.5",
"ember-cli-app-version": "0.3.3",
"tough-cookie": "^0.12.1",
"private-dep3": "git+ssh://[email protected]:reph/private-dep3.git#v0.3.5",
"private-dep1": "git+ssh://[email protected]:reph/private-dep1.git#v0.7.5"
}
整个日志是如下:
PS C:\DDrive\Projects\p-ceck> npm cache clean
PS C:\DDrive\Projects\p-ceck>
PS C:\DDrive\Projects\p-ceck>
PS C:\DDrive\Projects\p-ceck> bower cache clean
PS C:\DDrive\Projects\p-ceck>
PS C:\DDrive\Projects\p-ceck>
PS C:\DDrive\Projects\p-ceck>
PS C:\DDrive\Projects\p-ceck> npm install
Enter passphrase for key '/c/Users/user_name/.ssh/id_rsa': Enter passphrase for key '/c/Users/user_name/.ssh/id_rsa': Enter passphrase for key|'/c/Users/user_name/.ssh/id_rsa': |
/nter passphrase for key '/c/Users/user_name/.ssh/id_rsa':/
-nter passphrase for key '/c/Users/user_name/.ssh/id_rsa': -
/nter passphrase for key '/c/Users/user_name/.ssh/id_rsa': \
|nter passphrase for key '/c/Users/user_name/.ssh/id_rsa': -
//ter passphrase for key '/c/Users/user_name/.ssh/id_rsa':/
-nter passphrase for key '/c/Users/user_name/.ssh/id_rsa': -
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep3.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep3-git-bf7ad496: Cloning into bare repository 'C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep3-git-bf7ad496'...
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep3.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep3-git-bf7ad496: Permission denied (publickey).
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep3.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep3-git-bf7ad496: fatal: Could not read from remote repository.
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep3.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep3-git-bf7ad496:
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep3.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep3-git-bf7ad496: Please make sure you have the correct access rights
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep3.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep3-git-bf7ad496: and the repository exists.
/
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep1.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep1-git-82b6a6b3: Cloning into bare repository 'C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep1-git-82b6a6b3'...
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep1.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep1-git-82b6a6b3: Permission denied (publickey).
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep1.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep1-git-82b6a6b3: fatal: Could not read from remote repository.
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep1.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep1-git-82b6a6b3:
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep1.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep1-git-82b6a6b3: Please make sure you have the correct access rights
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep1.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep1-git-82b6a6b3: and the repository exists.
/
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep2.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep2-git-426ffed6: Cloning into bare repository 'C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep2-git-426ffed6'...
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep2.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep2-git-426ffed6: Permission denied (publickey).
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep2.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep2-git-426ffed6: fatal: Could not read from remote repository.
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep2.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep2-git-426ffed6:
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep2.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep2-git-426ffed6: Please make sure you have the correct access rights
npm ERR! git clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep2.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep2-git-426ffed6: and the repository exists.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror ssh://[email protected]/reph/private-dep3.git C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep3-git-bf7ad496
npm ERR! Cloning into bare repository 'C:\Users\user_name\AppData\Roaming\npm-cache\_git-remotes\ssh-git-github-comp-com-reph-private-dep3-git-bf7ad496'...
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! C:\DDrive\Projects\p-ceck\npm-debug.log