1

Attempted to install Homebrew with the following command:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Received this error:

fatal: unable to access 'https://github.com/Homebrew/homebrew/': SSL: Can't find the certificate "kgreenwood" and its private key in the Keychain.

Attempted to work on something else, discovered that I couldn't clone from git with HTTPS anymore. I generated an SSH keypair (disclaimer: I know almost nothing about certificates) and can now clone using SSH URLs.

I assume the issue is that the Homebrew installation command uses an HTTPS url. Is there some way I can force it to use SSH instead? I've tried "untar anywhere" alternative solution in their guide (typing mkdir homebrew && curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C homebrew in /usr/local) but I keep getting:

brew: command not found

2
  • Try building it from source by adding the --build-from-source flag when calling brew install.
    – kkmonlee
    Commented Aug 14, 2015 at 10:30
  • Regarding the brew: command not found error you have to add /usr/local/bin in your PATH. In your ~/.bashrc add the following: export PATH="/usr/local/bin:$PATH".
    – bfontaine
    Commented Aug 14, 2015 at 10:45

2 Answers 2

0

you can use ssh instead, as always on github.

clone it into any location.

git clone [email protected]:Homebrew/homebrew 

then adapt PATH. insert into .bashrc

export PATH=/path/to/homebrew-dir/bin:$PATH

then, do a brew update and brew doctor.

8
  • Regarding the “any location” part it’s always better to clone it in /usr/local. Homebrew will work if it’s installed in another place but some formulae won’t be available as bottles (= pre-compiled binaries).
    – bfontaine
    Commented Aug 14, 2015 at 10:46
  • Oh.... yes, I missed that Commented Aug 14, 2015 at 11:13
  • Wow of course. I was making that way harder than it had to be. I convinced myself that because I didn't know what "tarball" or "ruby -e "$(curl -fsSL etc" meant that it must have been more complicated than just cloning it from github. I originally had export PATH="/usr/local/bin:$PATH" in my .bash_profile. Just tried putting it in .bashrc but am still getting brew: command not found. Does the order matter? I have a few other things in there from RVM and Heroku Toolbelt.
    – kgreenwood
    Commented Aug 14, 2015 at 14:17
  • if you use mdfind -name brew, what is the output? I don't think it's /usr/local/bin. more like /usr/local/homebrew/bin but you have to try. Commented Aug 14, 2015 at 15:27
  • ps: tarball is a tar bundles archive (mostly .tar.gz the curl etc... inside the brackets downloades an install script and ruby -e executes it. but that is one of the reasons why I like homebrew more than MacPorts. you can simply clone a git repo and fix path. brew update does not much more than save changes and git pull Commented Aug 14, 2015 at 15:33
0

According to this post, most likely it's misconfiguration of your ~/.gitconfig.

Check for sslCert and sslVerify options and adjust the settings accordingly or remove them.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .