Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have installed and setup CodeReady containers on my mac, tried creating a project using the sample node js application, but the build is failing with this message in the logs.

Do we need to do any changes to CodeReady containers to access 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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
602 views
Welcome To Ask or Share your Answers For Others

1 Answer

I tried your command on crc. It worked for me. No additional steps required.

$ 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.

I assume you can access the github.com from your laptop. :)

Let's see if you can resolve GitHub from crc virtual VM.

From your laptop.

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

Now check if you can resolve 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.

If it is not working then your installation has a problem. Try to do a fresh setup again.

crc stop
crc clean-up
crc setup
crc start

Let us see how it goes.

BTW I use Fedora, not mac. I think the OS does not matter here.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...