V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
lawlietxxl
V2EX  ›  GitHub

求助! osx git 无法 clone github 上的资源,目测是 dns 的问题但是不知道如何解决

  •  
  •   lawlietxxl · 2015-12-08 21:54:06 +08:00 · 2657 次点击
    这是一个创建于 3069 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我在 mac 本地 git clone github 上的资源,一直提示一个错误:
    fatal: unable to access 'https://github.com/xx/xx.git/': Failed to connect to github.com port 443: Operation timed out

    但是奇怪的是,我用 vmware 建立的虚拟机去 git clone 相同的资源很成功,也挺快的。

    我在本地 ping github.com 显示的 ip 地址是 204.13.250.16
    我在虚拟机 ping ,显示的地址是 192.30.252.129
    显然第二个是对的,这是为什么呢。

    2 条回复    2015-12-08 21:56:08 +08:00
    lawlietxxl
        1
    lawlietxxl  
    OP
       2015-12-08 21:55:46 +08:00
    不好意思。。。亲们 已经解决了。
    是因为之前我把 hosts 用软件改了,然后删掉了 hosts 就行了。。
    cxbig
        2
    cxbig  
       2015-12-08 21:56:08 +08:00
    你的虚拟机用的什么网络配置? NAT 还是 Bridge ?
    检查一下你主机的 DNS 。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   826 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 19:57 · PVG 03:57 · LAX 12:57 · JFK 15:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.