1

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
aryanRaj_kary
  • 503
  • 2
  • 7
  • 28

1 Answers1

0

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.

AnilV
  • 56
  • 4