Angular-CLIで作成したプロジェクトに基づいてAngular 2ライブラリを作成する方法を学習しています。私はNikita Smolenskiiのこれらの例のng-demo-libとng-demo-appに行きます。私はNPM私が得るNG-デモアプリ上でインストールを実行する際の問題は、あるGithubリポジトリからライブラリをインストールするAngular 2
"ng-demo-lib": "git+ssh://[email protected]/nsmolenskii/ng-demo-lib.git",
:
npm ERR! git clone --template=/Users/xxx/.npm/_git-remotes/_templates --mirror ssh://[email protected]/nsmolenskii/ng-demo-lib.git /Users/xxx/.npm/_git-remotes/git-ssh-git-github-com-nsmolenskii-ng-demo-lib-git-ea5cc26b: Cloning into bare repository '/Users/xxx/.npm/_git-remotes/git-ssh-git-github-com-nsmolenskii-ng-demo-lib-git-ea5cc26b'...
npm ERR! git clone --template=/Users/xxx/.npm/_git-remotes/_templates --mirror ssh://[email protected]/nsmolenskii/ng-demo-lib.git /Users/xxx/.npm/_git-remotes/git-ssh-git-github-com-nsmolenskii-ng-demo-lib-git-ea5cc26b: Permission denied (publickey).
npm ERR! git clone --template=/Users/xxx/.npm/_git-remotes/_templates --mirror ssh://[email protected]/nsmolenskii/ng-demo-lib.git /Users/xxx/.npm/_git-remotes/git-ssh-git-github-com-nsmolenskii-ng-demo-lib-git-ea5cc26b: fatal: Could not read from remote repository.
npm ERR! git clone --template=/Users/xxx/.npm/_git-remotes/_templates --mirror ssh://[email protected]/nsmolenskii/ng-demo-lib.git /Users/xxx/.npm/_git-remotes/git-ssh-git-github-com-nsmolenskii-ng-demo-lib-git-ea5cc26b:
npm ERR! git clone --template=/Users/xxx/.npm/_git-remotes/_templates --mirror ssh://[email protected]/nsmolenskii/ng-demo-lib.git /Users/xxx/.npm/_git-remotes/git-ssh-git-github-com-nsmolenskii-ng-demo-lib-git-ea5cc26b: Please make sure you have the correct access rights
npm ERR! git clone --template=/Users/xxx/.npm/_git-remotes/_templates --mirror ssh://[email protected]/nsmolenskii/ng-demo-lib.git /Users/xxx/.npm/_git-remotes/git-ssh-git-github-com-nsmolenskii-ng-demo-lib-git-ea5cc26b: and the repository exists.
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v7.5.0
npm ERR! npm v4.1.2
npm ERR! code 128
npm ERR! Command failed: git clone --template=/Users/xxx/.npm/_git-remotes/_templates --mirror ssh://[email protected]/nsmolenskii/ng-demo-lib.git /Users/xxx/.npm/_git-remotes/git-ssh-git-github-com-nsmolenskii-ng-demo-lib-git-ea5cc26b
npm ERR! Cloning into bare repository '/Users/xxx/.npm/_git-remotes/git-ssh-git-github-com-nsmolenskii-ng-demo-lib-git-ea5cc26b'...
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/xxx/Desktop/nsmolenskii/ng-demo-app/npm-debug.log
私は」
ライブラリの依存関係がpackage.jsonで次のように記載されていpackage.json内のリモートリポジトリからインポートしようとしたことはありません。これは私にとって初めてのことです。 Githubが自分の身元を知るように設定する必要がありますか?このアクセス許可の問題を解決するにはどうすればよいですか?
を実行しますpackage.jsonからインストールします。 – BBaysinger
私の更新された返信を参照してください。 – zhimin