启用对gitlab.com的访问
我正在尝试在minishift中创建新的应用程序。第一个命令是:启用对gitlab.com的访问,git,openshift,minishift,Git,Openshift,Minishift,我正在尝试在minishift中创建新的应用程序。第一个命令是: oc new-app https://gitlab.com/practical-openshift/hello-world.git 结果: --> Found container image 2b6ec7e (10 hours old) from Docker Hub for "golang:alpine" * An image stream tag will be created as "
oc new-app https://gitlab.com/practical-openshift/hello-world.git
结果:
--> 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.
所以,当我跑步时:
oc logs -f buildconfig/hello-world
我得到一个错误:
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
我试着运行这个:
git config --global --unset http.proxy
git config --global --unset https.proxy
但它不起作用。那么,如何解决我的问题呢?尝试使用hostAlias。添加到buildconfig yaml
spec:
hostAliases:
- ip: "172.65.251.78"
hostnames:
- "gitlab.com"
如果不起作用,请将其添加到主机文件。
无法解析主机:gitlab.com
表示DNS错误。检查群集的DNS设置“_(ツ)_/“'可能没有)
中的ip
部分