【问题标题】:OpenShift Origin clone from own git repo error从自己的 git repo 错误的 OpenShift Origin 克隆
【发布时间】:2015-10-05 12:00:08
【问题描述】:

在我们公司,我们使用自己的带有自签名证书的 Git 存储库。

如果我尝试从外部 git 存储库在 OpenShift 中构建一个新应用程序,它不接受我们的证书(查看下面的日志)。直接使用git clone不会报错,所以原因很可能是OpenShift自带的git客户端。

以下是 oc build-logs 中的详细信息

如果它试图通过 ssh 克隆 repo:

I1005 09:26:33.661857       1 docker.go:203] Cloning source from ssh://username@git-repo-url:port/blablabla/xyz.git
E1005 09:26:33.718445       1 git.go:102] Clone failed: Host key verification failed.
fatal: Could not read from remote repository.

通过 https:

I1005 11:49:52.134760       1 docker.go:203] Cloning source from https://username@git-repo-url:port/blablabla/xyz.git
E1005 11:49:52.392426       1 git.go:102] Clone failed: fatal: unable to access 'https://username@git-repo-url:port/blablabla/xyz.git': Peer's certificate issuer has been marked as not trusted by the user.
F1005 11:49:52.392460       1 builder.go:54] Build error: exit status 128
.gitconfig 中的

sslVerify 设置为 false。

任何想法如何让 OpenShift 接受证书或忽略它? 非常感谢!

附: OpenShift Origin 是这样安装的: https://github.com/openshift/openshift-ansible/blob/master/README_origin.md

更新:尝试了以下解决方案但没有效果: https://docs.openshift.org/latest/dev_guide/builds.html#using-private-repositories-for-builds

版本:

oc v1.0.6-2-ge2a02a8 
kubernetes v1.1.0-alpha.0-1605-g44c91b1

【问题讨论】:

  • OpenShift Origin 是如何设置的?我假设您是否使用了您使用这些说明的docker 标签? docs.openshift.org/latest/getting_started/…
  • 我现在把这些信息放在主要问题中
  • 您是否在构建中包含了包含 sslVerify 设置的 .gitconfig?

标签: git ssh ssl-certificate openshift-origin


【解决方案1】:

通过 Secret 提供 .gitconfig 的功能是最近才添加到 OpenShift 中的,您的部署的最新情况如何?

关于如何提供 .gitconfig(包括设置 sslVerify)的说明在这里:https://docs.openshift.org/latest/dev_guide/builds.html#other-authentication

【讨论】:

  • 这正是我尝试过的,但没有成功。部署大约是。 2 周大.. oc v1.0.6-2-ge2a02a8 kubernetes v1.1.0-alpha.0-1605-g44c91b1
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-12-21
  • 1970-01-01
  • 2022-11-02
  • 2013-08-07
  • 2016-09-06
相关资源
最近更新 更多