npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/adobe-webplatform/eve.git
npm ERR! git@github.com: 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! D:\Develo\nodejs\node_cache\_logs\2022-02-23T03_34_18_949Z-debug-0.log
尝试使用建立SSH密钥解决git异常,但没有效果
修改Git协议,更换连接方式,将ssh://git@换成https://
git config --global url."https://".insteadOf ssh://git@
npm i //再次安装
依旧出错
npm ERR! code 128
npm ERR! git dep preparation failed
npm ERR! command D:\nodejs\node.exe D:\nvm\v16.14.0\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code 128
npm ERR! npm ERR! A git connection error occurred
npm ERR! npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/adobe-webplatform/eve.git
npm ERR! npm ERR! kex_exchange_identification: read: Connection reset by peer
npm ERR! npm ERR! Connection reset by 20.205.243.166 port 22
npm ERR! npm ERR! fatal: Could not read from remote repository.
npm ERR! npm ERR!
npm ERR! npm ERR! Please make sure you have the correct access rights
npm ERR! npm ERR! and the repository exists.
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\AppData\Local\npm-cache\_logs\2022-03-04T08_29_17_072Z-debug-0.log072Z-debug-0.log
npm ERR! A complete log of this run can be found in: g-0.log
npm ERR! C:\Users\AppData\Local\npm-cache\_logs\2022-03-04T08_27_27_482Z-debug-0.log
使用镜像网站后,安装成功
git config --global url."https://hub.fastgit.xyz/".insteadOf "ssh://git@github.com/"
效果如下: