English 中文(简体)
注意行为失检
原标题:mac dns look up misbehaving

有了一个新的 mac, 现在我正在尝试安装/ 更新一些东西。 THE 第一期我得到的是 http 网络内部的脚本/ 程序( 如 git 或 Ruby prem) 的要求不起作用 。 我会在下面举一个例子说明我采用的变通方法, 因为它比任何解释都更能说明问题。 任何帮助都会受到赞赏!

Leonardos-MacBook-Air:~ leo$ git clone git://github.com/sstephenson/rbenv.git .rbenv
Cloning into  .rbenv ...
fatal: Unable to look up github.com (port 9418) (nodename nor servname provided, or not known)
# it can not find github.com

Leonardos-MacBook-Air:~ leo$ ping github.com
PING github.com (207.97.227.239): 56 data bytes
64 bytes from 207.97.227.239: icmp_seq=0 ttl=50 time=104.279 ms
64 bytes from 207.97.227.239: icmp_seq=1 ttl=50 time=105.658 ms
# it finds it in a ping, curl, or even a browser. this shows that it s not a network (proxy) issue


NOT SO ELEGANT SOLUTION
Leonardos-MacBook-Air:~ leo$ cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             localhost 
fe80::1%lo0 localhost
207.97.227.239  github.com
# I added this last line in the /etc/hosts file

Leonardos-MacBook-Air:~ leo$ git clone git://github.com/sstephenson/rbenv.git .rbenv
Cloning into  .rbenv ...
remote: Counting objects: 1040, done.
remote: Compressing objects: 100% (419/419), done.
remote: Total 1040 (delta 650), reused 959 (delta 593)
Receiving objects: 100% (1040/1040), 138.25 KiB, done.
Resolving deltas: 100% (650/650), done.
# now it works
问题回答

我那该死的 ISP s DNS 服务器是这里的罪魁祸首。 将我的路由器 S DNS 设置改为 < a href=> "https:// developmenters.google. com/ speed/public- dns/" rel="nofollow" > Google s public DNS





相关问题
How do I build a DNS Query record in Erlang?

I am building a native Bonjour / Zeroconf library and need to build DNS query records to broadcast off to the other machines. I have tried looking thru the Erlang source code but as I am relatively ...

powerdns-on-rails ArgumentError

My Environments: CentOS 5 ruby 1.8.6 (2008-08-11 patchlevel 287) [x86_64-linux] Ruby Enterprise Edition 20090610 passneger or webrick I use this gem list. *** LOCAL GEMS *** actionmailer (2.3.2, 2....

简讯

我是否可以使用某些软件来建立简便的航天国家服务器,最好是在 Java? 所有我都希望我的航天国家服务机在任何要求中都用同样的IP地址来回答。

Domains & Foreward Slash

This is rather difficult to explain so please bear with me. We will be hosting 4 websites on our server and the plan is to have each site sit under its own domain: site-a.com site-b.com sub1.site-b....

Checking if a domain name is registered

How would I go about checking if a domain name is registered? I was thinking about checking if it has a corresponding IP but it doesn t seem to work as well as I had hoped. Is there a solution in ...

How do I setup a reverse DNS entry in Plesk 9.2.2 frontent?

I need to get a reverse DNS entry into my zones file for one of my domains hosted under Plesk 9.2.2. Does anybody have ANY idea how this done? If all else fails I will have to update the zones file ...

热门标签