2

I'm using OS X Lion (10.7.2).

I installed Homebrew on my Mac, and I executed the command below.

$ brew install git

and then:

$ brew update
error: Could not resolve host: github.com; nodename nor servname provided, or not known while accessing https://github.com/mxcl/homebrew.git/info/refs   
fatal: HTTP request failed
Error: Failed while executing git pull  origin refs/heads/master:refs/remotes/origin/master

What happened there?

5
  • 1
    this question belongs to Super User. check your network and that you can reach github.com with your browser
    – CharlesB
    Nov 16, 2011 at 17:43
  • 2
    what does the command ping github.com return? Nov 16, 2011 at 17:44
  • Mac OS X already has git - just install the developer tools (Xcode) if you haven't already.
    – Paul R
    Nov 16, 2011 at 17:55
  • @PaulR Maybe they want a more recent version?
    – slhck
    Nov 16, 2011 at 20:26
  • @slhck: could be - the question isn't very clear as to motivation
    – Paul R
    Nov 17, 2011 at 8:00

1 Answer 1

-1

1) If you use CLI package managers such as brew, port, fink, … some installations require root privileges. In these cases run your installation command with sudo:

sudo brew install git

2) Check wether you can github.com via a web browser.

3
  • 2
    Actually, you're not supposed to use sudo with Homebrew. Installation instructions say so, as does the FAQ.
    – Miikka
    Nov 16, 2011 at 19:25
  • 2
    It's wrong to say that installation in Homebrew is "properly" done with elevated privileges. Please fix your answer.
    – slhck
    Nov 16, 2011 at 20:25
  • Thanks for correcting me. I don't know brew in particular, just CLI package managers in general, and from my experience I can say that some installations require root privileges, for this cases executing via sudo can help.
    – porg
    Nov 25, 2011 at 17:35

You must log in to answer this question.

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