我正在使用 macOS Monterey 并嘗試使用 Homebrew 安裝 Php。我在幾篇文章中讀到,通過 Homebrew 安裝是在 Mac 上進(jìn)行此操作的最簡單方法。我正在關(guān)注本教程: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.
你覺得我該如何度過這個難關(guān)?
我已成功設(shè)置 SSH 密鑰并將其添加到我的 GitHub 帳戶。您認(rèn)為我可以使用它來驗(yàn)證我的帳戶并繼續(xù)安裝嗎?顯然,我是這方面的初學(xué)者。
我查閱了有關(guān)如何使用 SSH 密鑰進(jìn)行身份驗(yàn)證的文章,他們討論了公鑰和私鑰。我可以同時使用公鑰和私鑰。
因此,問題歸結(jié)為能夠使用也已添加到 GitHub 帳戶的現(xiàn)有 SSH 密鑰進(jìn)行身份驗(yàn)證。我曾嘗試這樣做,但到目前為止還沒有運(yùn)氣。而且我不愿意研究其中一篇文章,因?yàn)樗赡苄枰L時間。
有人可以指出我正確的方向嗎?非常感謝..!
您好,我已經(jīng)檢查了您的詳細(xì)信息,但 GitHub 上的 saadmohammad 沒有 Homebrew/php 的存儲庫,因此它拋出錯誤。如果在 https://github.com/saadmohammad/homebrew-php/ 找到存儲庫上面的錯誤響應(yīng)中提到了這一點(diǎn),然后它運(yùn)行良好。
它不是“brew tap username/php”,它實(shí)際上是 GitHub 上的存儲庫。因此,使用brew tap shivammathur/php 并通過命令brew install shivammathur/php/php@8 安裝php。
謝謝