www.question-defense.com | Engage: Visit :: Login :: Register

I was attempting to clone a github repo on a Slicehost account and received the error below. Its possible that github.com recently updated DNS so if this happens to you then you can use the temporary fix I located on github’s twitter account.

Error:fatal: Unable to look up github.com (port 9418) (Name or service not known)

This error was caused by attempting to clone edavis10′s redmine repo using the command below.

git clone git://github.com/edavis10/redmine.git

To resolve this issue add the following line to /etc/hosts on your Linux server.

65.74.177.129 github.com wiki.github.com gist.github.com assets0.github.com assets1.github.com assets2.github.com assets3.github.com

Make sure to remove this line once DNS is working again from your server.

DeliciousStumbleUponDiggTwitterFacebookRedditLinkedInEmail

Related posts:

  1. Permission denied (publickey). fatal: The remote end hung up unexpectedly You will receive the below dialogue if the SSH key...
  2. Add a SSH Key to Your Github Account for a Linux Server Adding an SSH key to your github.com account for a...
  3. xinetd[11497]: service/protocol combination not in /etc/services: nrpe/tcp If you are in process of installing the NRPE daemon...
  4. Fatal error: Cannot redeclare tc_post() The entire error I recieved was: Fatal error: Cannot redeclare...
  5. qmgr fatal: unsupported dictionary type: mysql I noticed this error during an ISPConfig on CentOS 5.2...
Tags: , , , , , , , , ,
12 Responses to “fatal: Unable to look up github.com (port 9418) (Name or service not known)”
  1. Pyrrhic says:

    Dear Alex:

    Thank you HUGELY for this post. After looking in many places trying to get tunnelling to work and doing ‘this’ and ‘that’ your simple suggestion instantly fixed our project and helped put us back on timeline. Thank you, again!

    Best,

    Pyrrhic

    [Reply]

    alex Reply:

    Hello Pyrrhic,

    Glad it helped. Its always nice to have feedback lik e this. We do write all of these articles for free and accept donations if you feel the article went above and beyonod toss a dollar in our PayPal account… link located at the top of every page right below the navigation. Regardless of if you are able to do so or not we will continue to write as many articles as we can and we will continue to feed off of positive feedback such as your comment above.

    Thanks.
    Alex

    [Reply]

  2. manoj says:

    hai ,
    what should i do if i am on windows

    [Reply]

    alex Reply:

    Hello manoj,

    Add a similar line to the “hosts” file on your Windows server. The exact location varies on the Windows OS version such as Windows 7, Windows Vista, Windows XP, Windows Server 2003, etc. You should be able to track that information down on the Internet though without issue.

    Thanks.
    alex

    [Reply]

  3. Harsha says:

    Hi Alex,

    I have created a git repository and i’m trying to clone it using the command :

    git clone git://home/repo_evm/harsha

    Below is the error that is getting displayed.

    Initialized empty Git repository in /home/sriharsha/.git/
    fatal: Unable to look up home (port 9418) (Name or service not known)

    Any help would be appreciative.

    Regards,
    SriHarsha

    [Reply]

    alex Reply:

    Hello Harsha,

    This is a bit different than what the article content is about however I believe I can provide some useful information. Try the below command instead if the repo is on the same server you are cloning to but if not just change localhost to the IP address of the machine you are cloning from…

    git clone user@localhost:/home/repo_evm/harsha

    You will also need to change the “user” in the above command to the proper user that owns the repo.

    Hope that helps.

    Thanks.
    alex

    [Reply]

  4. Harsha says:

    Hi Alex,

    Thank you for the prompt help.

    Regards,
    N.S.SriHarsha

    [Reply]

    alex Reply:

    Hello Harasha,

    No problem. Thanks for taking the time to follow up and leave feedback.

    Thanks.
    alex

    [Reply]

  5. Sandip says:

    Hi,
    It does not work. When I modified /etc/hosts and sourced it, I get the following:
    65.74.177.129: command not found

    And the cloning fails.

    _Sandip

    [Reply]

    alex Reply:

    Hello Sandip,

    This article was written more than 2 years ago so it is possible they have changed the IP address. You might try doing a nslookup or dig with the domain you are connecting to. It is also possible there is something else blocking the traffic between you and github.

    Thanks.
    alex

    [Reply]

  6. maarige says:

    thanks for the post
    But i hv another error that after doing the above steps im getting the following error now

    Initialized empty Git repository in /home/idris-outdoor/libfreenect/.git/
    github.com[0: 65.74.177.129]: errno=Connection refused
    fatal: unable to connect a socket (Connection refused)

    thanks in advance

    [Reply]

    alex Reply:

    Hello maarige,

    Looks like you do not have github configured properly as it is refusing your connection. Follow the steps to generate and configure SSH keys.

    Thanks.
    alex

    [Reply]

  7.  
Leave a Reply

*Type the letter/number combination in the abvoe field before clicking submit.

*