解决从远程git仓库拉代码,npm i 时报的错误
npm ERR! code 128
nPM ERR!
An unknown git error occurredcommand git --no-replace-objects ls-remote ssh://git@github.com/nhn/raphael.gitgit@github.com:Permission denied(publickey)fatal: Could not read from remote repository.
ERRA
npm
npM ERR!
npM ERR!
nPM ERR!
ERR!Please make sure you have the correct access rightsnpmnpM ERR!and the repository exists
原因:这里是因为拉取代码会包没有仓库权限的错误
解决办法:打开项目文件>点击查看>找到隐藏git项目 删除git文件仓库 就解决了
tip:如果删除git仓库后依旧报同样错,清理一下node缓存就好了,亲测有用
清除node缓存指令npm cache clean --force