Mar
25
2009
fatal: Unable to look up github.com (port 9418) (Name or service not known)
Posted by alex in Errors at 2:51 PMI 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.
Related posts:
- Permission denied (publickey). fatal: The remote end hung up unexpectedly You will receive the below dialogue if the SSH key...
- Add a SSH Key to Your Github Account for a Linux Server Adding an SSH key to your github.com account for a...
- xinetd[11497]: service/protocol combination not in /etc/services: nrpe/tcp If you are in process of installing the NRPE daemon...
- Fatal error: Cannot redeclare tc_post() The entire error I recieved was: Fatal error: Cannot redeclare...
- qmgr fatal: unsupported dictionary type: mysql I noticed this error during an ISPConfig on CentOS 5.2...








Entries (RSS)
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:
July 15th, 2009 at 8:45 PM
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]
hai ,
what should i do if i am on windows
[Reply]
alex Reply:
March 22nd, 2010 at 6:40 PM
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]
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:
November 11th, 2010 at 10:59 AM
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]
Hi Alex,
Thank you for the prompt help.
Regards,
N.S.SriHarsha
[Reply]
alex Reply:
March 14th, 2011 at 12:09 PM
Hello Harasha,
No problem. Thanks for taking the time to follow up and leave feedback.
Thanks.
alex
[Reply]
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:
April 8th, 2012 at 11:43 PM
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]
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:
April 8th, 2012 at 11:22 PM
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]