使用 Homebrew 在 MacOS 上安装 Php 期间验证 GitHub 帐户时遇到问题
P粉550323338
P粉550323338 2024-02-03 19:10:58
0
1
351

我正在使用 macOS Monterey 并尝试使用 Homebrew 安装 Php。我在几篇文章中读到,通过 Homebrew 安装是在 Mac 上进行此操作的最简单方法。我正在关注本教程:https://www.geeksforgeeks.org/how-to-install-php-on-macos/

成功安装Homebrew后,我使用命令brew tap username/php

这是我在终端上得到的:

==> Tapping saadmohammad/php
Cloning into '/opt/homebrew/Library/Taps/saadmohammad/homebrew-php'...
Username for 'https://github.com': saad931549
Password for 'https://[email protected]': 
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/saadmohammad/homebrew-php/'
Error: Failure while executing; `git clone https://github.com/saadmohammad/homebrew-php /opt/homebrew/Library/Taps/saadmohammad/homebrew-php --origin=origin --template=` exited with 128.

你觉得我该如何度过这个难关?

我已成功设置 SSH 密钥并将其添加到我的 GitHub 帐户。您认为我可以使用它来验证我的帐户并继续安装吗?显然,我是这方面的初学者。

我查阅了有关如何使用 SSH 密钥进行身份验证的文章,他们讨论了公钥和私钥。我可以同时使用公钥和私钥。

因此,问题归结为能够使用也已添加到 GitHub 帐户的现有 SSH 密钥进行身份验证。我曾尝试这样做,但到目前为止还没有运气。而且我不愿意研究其中一篇文章,因为它可能需要太长时间。

有人可以指出我正确的方向吗?非常感谢..!

P粉550323338
P粉550323338

全部回复(1)
P粉574695215

您好,我已经检查了您的详细信息,但 GitHub 上的 saadmohammad 没有 Homebrew/php 的存储库,因此它抛出错误。如果在 https://github.com/saadmohammad/homebrew-php/ 找到存储库上面的错误响应中提到了这一点,然后它运行良好。

它不是“brew tap username/php”,它实际上是 GitHub 上的存储库。因此,使用brew tap shivammathur/php 并通过命令brew install shivammathur/php/php@8 安装php。

谢谢

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!