windows 下 npm 拉取 github 仓库问题

npm拉私有仓库报错 Permission denied (publickey) 怎么办呢?

npm 拉私有仓库报错无权限问题

$ npm i
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://
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! A complete log of this run can be found in:
npm ERR!     C:\Users\wojia\AppData\Local\npm-cache\_logs\2022-07-27T03_44_39_166Z-debug-0.log




  1. 在本地 生成 ssh key,然后添加到 github 配置。
  2. 添加到本地项目
  3. windows 下要启动一个啥 服务
  4. 可以开始 npm install 了, 带上https:// 后缀 .git ,如果要制定tag 再添加 #V1.0.0