Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
590 views
in Technique[技术] by (71.8m points)

openshift - Red Hat CodeReady containers - unable to access github.com

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

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

1 Reply

0 votes
by (71.8m points)

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 [email protected]

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...