安装vue-element-admin项目报错

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/"

效果如下:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值