Page 1 of 1

can't resolve github.com

Posted: Wed Jul 03, 2013 12:24 am
by cfranz
I can't seem to use github at all for anything I've tried. The most obvious is 'rpi-update' reporting that it cannot resolve 'github.com'. The following is the run in total:
  • pi@raspberrypi ~ $ sudo rpi-update
    *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS
    *** Performing self-update
    --2013-07-02 19:15:43-- https://github.com/Hexxeh/rpi-update/ra ... rpi-update
    Resolving github.com (github.com)... failed: Name or service not known.
    wget: unable to resolve host address `github.com'
    !!! Failed to download update for rpi-update!
    !!! Make sure you have ca-certificates installed and that the time is set correctly

I've run install and upgrade for the ca-certificates and 'apt-get' says that they are fine. The date/time are set fine. I've played with my network settings and have tried it with the WiFi and hard connect.

Any ideas?

Thanks,
Carl

Re: can't resolve github.com

Posted: Wed Jul 03, 2013 5:47 am
by Hove
Hi Carl,

From what I remember when I did this, you need to install git first

Code: Select all

sudo apt-get install git-all
Try it again once that's installed.

Andy

Re: can't resolve github.com

Posted: Wed Jul 03, 2013 6:48 am
by rpdom
cfranz wrote:Resolving github.com (github.com)... failed: Name or service not known.
wget: unable to resolve host address `github.com'
Do you have a working internet connection?

What you seem to be getting is a DNS error when looking up the IP address for the name "github.com".

Does this work?

Code: Select all

ping -c 1 google.com
What are the contents of your /etc/resolv.conf file?
and the output of these commands:

Code: Select all

sudo ifconfig -a
ip route

Re: can't resolve github.com

Posted: Wed Jan 01, 2014 6:03 am
by pangren
I've also been having this problem. But I just stumbled on this solution (url below) and it works! It is a wget issue and after u

Code: Select all

sudo nano /etc/wgetrc 
add the line :

Code: Select all

inet4_only = on

and you'll be on your way.

http://www.raspberrypi.org/phpBB3/viewt ... 2&p=235342

Re: can't resolve github.com

Posted: Wed Jan 01, 2014 2:11 pm
by DougieLawson
It's simpler than you think.

Code: Select all

PING github.com (192.30.252.131) 56(84) bytes of data.
Your netmask is wrong! It should be 255.255.255.0.

Your home network is 192.168.xxx.xxx or in CIDR 192.168.0.0/24
Github.com is 192.30.252.131

If you set your local netmask to 255.0.0.0 so your network is 192.0.0.0/8 then TCP/IP assumes that github.com is part of your local subnet, it won't ask the gateway/router to route the packets out to the public Internet.

There'll be another 16 million other websites that are also not accessible.