Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Nov 16 '11 at 17:50

This question came from our site for professional and enthusiast programmers.

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

1 Answer 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.

share|improve this answer
2  
Actually, you're not supposed to use sudo with Homebrew. Installation instructions say so, as does the FAQ. –  Miikka Nov 16 '11 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 '11 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 '11 at 17:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.