背景:
在安裝vue-element-admin 項(xiàng)目所需依賴時(shí),出現(xiàn)了如下報(bào)錯(cuò)信息
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
解決辦法:
1、使用下面的命令,達(dá)到,把地址里的 ssh://git@
換成 https://
的目的
git config --global url."https://".insteadOf ssh://git@
2、然后重新通過(guò) npm install 安裝項(xiàng)目依賴
npm install
效果圖:
?
?文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-525507.html
?文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-525507.html
到了這里,關(guān)于npm ERR! code 128npm ERR! An unknown git error occurrednpm ERR! command git --no-replace-objects l的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!