gpt4 book ai didi

node.js - 如何解决 npm install react-select failure with error : An unknown git error occurred, git@github.com :Permission denied (publickey)

转载 作者:行者123 更新时间:2023-12-05 05:33:29 28 4
gpt4 key购买 nike

我在为我的 React 应用程序安装 React-Select 时遇到问题,我尝试了以下命令:

npm config set registry http://registry.npmjs.org 
npm install --save react-select

我遇到以下错误:

An unknown git error occurred 
git --no-replace-objects ls-remote ssh://git@github.com/eligrey/FileSaver.js.git
git@github.com :Permission denied (publickey)
fatal: Could not read from remote repository

Please make sure you have the correct access rights and
the repository exists

我系统目前安装的版本是node(v16.17.0)、npm(8.19.2)、react(18.2.0)

我该如何解决这个问题?

谢谢

最佳答案

https://github.com/eligrey/FileSaver.js是可访问的,它是一个公共(public)存储库。

您需要做的就是确保 ssh -Tv github.com 正常工作,这意味着它会给您一条欢迎消息(“您好用户名!您已成功通过身份验证... ")

确保您的 SSH key 是 createdregistered to your GitHub profile ,然后重试您的 npm 命令。

关于node.js - 如何解决 npm install react-select failure with error : An unknown git error occurred, git@github.com :Permission denied (publickey),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73834923/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com