我正在嘗試使用此命令安裝 Heroku CLI
brew tap heroku/brew && brew install heroku
但我收到此錯誤
akshaybandivadekar@Akshays-MacBook-Pro ~ % brew tap heroku/brew && brew install heroku
==> Tapping heroku/brew
Cloning into '/usr/local/Homebrew/Library/Taps/heroku/homebrew-brew'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Error: Failure while executing; `git clone https://github.com/heroku/homebrew-brew /usr/local/Homebrew/Library/Taps/heroku/homebrew-brew --origin=origin --template=` exited with 128.
我檢查了我的 GitHub 個人資料,我的 ssh 密鑰設定在那里成功。我可以使用 ssh 設定克隆任何公共存盤庫,例如
git clone [email protected]:lodash/lodash.git
但是這個命令不起作用
git clone https://github.com/lodash/lodash.git
我完成了本文中給出的所有命令 => https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-它到 ssh 代理
但仍然面臨同樣的問題。
uj5u.com熱心網友回復:
首先,任何不使用“git”作為其遠程用戶的 SSH URL 都不起作用。
所以[email protected]無法使用。
第二個https://github.com/lodash/lodash.git是 HTTPS URL,而不是 SSH URL。
如果您想使用您的私人 SSH 密鑰,您需要:
git clone [email protected]:lodash/lodash.git
如果要強制使用 SSH:
git config --global url."[email protected]:".insteadOf "https://github.com/"
但是您需要確保您有權訪問該存盤庫。
此外,如果 [email protected] 是依賴項的一部分:
git config --global url."[email protected]:".insteadOf "[email protected]:"
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/380321.html
上一篇:OperationalError,錯誤111連接到127.0.0.1:6379。拒絕連接。在heroku中部署后
下一篇:PHP如何插入到MySQL多行
