0

I'm trying to create new-app in the minishift. First command is:

oc new-app https://gitlab.com/practical-openshift/hello-world.git

Result:

--> Found container image 2b6ec7e (10 hours old) from Docker Hub for "golang:alpine"

* An image stream tag will be created as "golang:alpine" that will track the source image
* A Docker build using source code from https://gitlab.com/practical-openshift/hello-world.git will be created
  * The resulting image will be pushed to image stream tag "hello-world:latest"
  * Every time "golang:alpine" changes a new build will be triggered

--> Creating resources ...
    imagestream.image.openshift.io "golang" created
    imagestream.image.openshift.io "hello-world" created
    buildconfig.build.openshift.io "hello-world" created
    deployment.apps "hello-world" created
    service "hello-world" created
--> Success
    Build scheduled, use 'oc logs -f buildconfig/hello-world' to track its progress.
    Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
     'oc expose service/hello-world'
    Run 'oc status' to view your app.

So, when i'm running:

oc logs -f buildconfig/hello-world

I get error:

Cloning "https://gitlab.com/practical-openshift/hello-world.git" ...
WARNING: timed out waiting for git server, will wait 1m4s
error: fatal: unable to access 'https://gitlab.com/practical-openshift/hello-world.git/': Could not resolve host: gitlab.com; Unknown error

I tryed to run this:

 git config --global --unset http.proxy
 git config --global --unset https.proxy

But it's not worked. So, how can i resolve my issue?

Yuri Molodyko
  • 590
  • 6
  • 20

1 Answers1

1

Try to use hostAlias. Add to your buildconfig yaml.

spec:
  hostAliases:
  - ip: "172.65.251.78"
    hostnames:
    - "gitlab.com"

If it does not work add this to your hosts file.

Simon
  • 4,251
  • 2
  • 24
  • 34
Mustafa Güler
  • 884
  • 6
  • 11