全新的本机反应项目,试图从项目目录中运行npm install react-native-firebase/app
和yarn add react-native-firebase/app
,结果是:
Jamess-MacBook-Pro:Redux_ReactNav vorousjames$ yarn add react-native-firebase/app
yarn add v1.5.1
[1/4] ? Resolving packages...
error An unexpected error occurred: "Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads ssh://git@github.com/react-native-firebase/app.git
Directory: /Users/vorousjames/Desktop/Development/Redux_ReactNav/Redux_ReactNav
Output:
Warning: Permanently added the RSA host key for IP address '140.82.114.3' to the list of known hosts.
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.".
info If you think this is a bug, please open a bug report with the information provided in "/Users/vorousjames/Desktop/Development/Redux_ReactNav/Redux_ReactNav/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
研究了这个问题之后,我再也没有在我的机器或github上设置任何生成的公共密钥或类似的东西,有人知道如何成功地安装带有此错误的npm项目吗?
答案 0 :(得分:0)
除了确保将公共SSH密钥注册到您的帐户(ssh -Tv git@github.com
)之外,还需要确保存储库应用程序确实存在。
我在https://github.com/react-native-firebase中看不到“应用”存储库
它可能是私有的(在这种情况下,您应该是React Native Firebase组织的成员),但是如果它不存在,则会收到该错误消息。