cfranz
Posts: 4
Joined: Sun Jun 16, 2013 3:00 am

can't resolve github.com

Wed Jul 03, 2013 12:24 am

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

User avatar
Hove
Posts: 1205
Joined: Sun Oct 21, 2012 6:55 pm
Location: Cotswolds, UK
Contact: Website

Re: can't resolve github.com

Wed Jul 03, 2013 5:47 am

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
www.pistuffing.co.uk - Raspberry Pi and other stuffing!

User avatar
rpdom
Posts: 17575
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: can't resolve github.com

Wed Jul 03, 2013 6:48 am

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

pangren
Posts: 42
Joined: Thu Dec 19, 2013 2:52 pm

Re: can't resolve github.com

Wed Jan 01, 2014 6:03 am

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

User avatar
DougieLawson
Posts: 39871
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: can't resolve github.com

Wed Jan 01, 2014 2:11 pm

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.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Return to “Beginners”