Home > Blockchain >  Install Heroku CLI on Mac showing exited with 128 error
Install Heroku CLI on Mac showing exited with 128 error

Time:12-13

I am trying to install Heroku CLI using this command

brew tap heroku/brew && brew install heroku

But I am getting this error

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.

I have checked my GitHub profile and my ssh key setup is successful there. I am able to clone any public repo using ssh setup for eg

git clone [email protected]:lodash/lodash.git

But this command is not work

git clone https://github.com/lodash/lodash.git

I am done with all commands given in this article => https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

But still facing the same issue.

CodePudding user response:

First, any SSH URL which does not use 'git' as its remote user would not work.
So [email protected] cannot be used.

Second https://github.com/lodash/lodash.git is an HTTPS URL, not an SSH one.
If you want to use your private SSH key, you would need:

git clone [email protected]:lodash/lodash.git

If you want to force using SSH:

git config --global url."[email protected]:".insteadOf "https://github.com/"

But you need to be sure that you have the right to access that repository.

Also, if [email protected] is part of the dependencies:

git config --global url."[email protected]:".insteadOf "[email protected]:"
  • Related