【问题标题】:Red Hat CodeReady containers - unable to access github.comRed Hat CodeReady 容器 - 无法访问 github.com
【发布时间】:2020-12-31 06:02:41
【问题描述】:

我已经在我的 Mac 上安装并设置了 CodeReady 容器,尝试使用示例节点 js 应用程序创建项目,但构建失败并在日志中显示此消息。

我们是否需要对 CodeReady 容器进行任何更改才能访问 github.com?

Cloning "https://github.com/sclorg/nodejs-ex.git" ...
error: fatal: unable to access 'https://github.com/sclorg/nodejs-ex.git/': Could not resolve host: github.com

【问题讨论】:

    标签: openshift redhat-containers


    【解决方案1】:

    我在 crc 上试过你的命令。它对我有用。 无需额外步骤。

    $ oc new-app https://github.com/sclorg/nodejs-ex
    --> Found image db4e490 (2 months old) in image stream "openshift/nodejs" under 
    ...
    ...
        Run 'oc status' to view your app.
    

    我假设您可以从笔记本电脑访问 github.com。 :)

    看看能不能从 crc 虚拟机解析 GitHub。

    从您的笔记本电脑中。

    $ host api.crc.testing
    $ ssh -i ~/.crc/machines/crc/id_rsa core@192.168.130.11
    

    现在检查是否可以解决 github

    [root@crc-fdm75-master-0 ~]$ host github.com                             
    github.com has address 13.234.210.38
    github.com mail is handled by 1 aspmx.l.google.com.
    github.com mail is handled by 10 alt3.aspmx.l.google.com.
    github.com mail is handled by 10 alt4.aspmx.l.google.com.
    github.com mail is handled by 5 alt1.aspmx.l.google.com.
    github.com mail is handled by 5 alt2.aspmx.l.google.com.
    

    如果它不起作用,则说明您的安装有问题。尝试重新设置。

    crc stop
    crc clean-up
    crc setup
    crc start
    

    让我们看看进展如何。

    顺便说一句,我使用 Fedora,而不是 mac。我认为操作系统在这里无关紧要。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-09-04
    • 1970-01-01
    • 1970-01-01
    • 2016-11-22
    • 2014-10-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多