LoginSignup
1
1

More than 5 years have passed since last update.

npm@2.7.6でgithubのプライベートリポジトリからnpm installすると認証でエラーになる

Posted at
  • npm installで認証エラーがでるので
$ npm -v
2.7.6

$ npm i git+https://<token>@github.com/<username>/<reponame>.git
npm ERR! git fetch -a origin (ssh://git@github.com/<username>/<reponame>.git) Permission denied (publickey).
npm ERR! git fetch -a origin (ssh://git@github.com/<username>/<reponame>.git) fatal: Could not read from remote repository.
npm ERR! git fetch -a origin (ssh://git@github.com/<username>/<reponame>.git)
npm ERR! git fetch -a origin (ssh://git@github.com/<username>/<reponame>.git) Please make sure you have the correct access rights
...
$ npm install -g npm@2.7.3
/usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
npm@2.7.3 /usr/lib/node_modules/npm
$ npm -v
2.7.3
$ npm i git+https://<token>@github.com/<username>/<reponame>.git
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1