- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在这样启动操作系统:
oc cluster up --public-hostname=julio-oc.10.238.41.233.nip.io
我还有一个私有(private)的 github 存储库,配置了一个部署 key ,只有一个普通的 Dockerfile
。
然后我按如下方式添加 secret :
oc secrets new-sshauth sleep-key-rsa --ssh-privatekey=/home/julio/.ssh/sleep-key_rsa
如果我尝试创建应用程序,它会失败:
> oc new-app --source-secret=sleep-key-rsa git@github-isl-01.ca.com:garju09/docker-sleep.git
error: Errors occurred while determining argument types:
git@github-isl-01.ca.com:garju09/docker-sleep.git as a Git repository URL: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
但是如果我将 key 添加到 ssh 代理,它现在可以工作了:
> ssh-add ~/.ssh/sleep-key_rsa
Identity added: /home/julio/.ssh/sleep-key_rsa (/home/julio/.ssh/sleep-key_rsa)
> oc new-app --source-secret=sleep-key-rsa git@github-isl-01.ca.com:garju09/docker-sleep.git
--> Found Docker image 3fa8225 (2 weeks old) from Docker Hub for "centos:centos7"
* An image stream will be created as "centos:centos7" that will track the source image
* A Docker build using source code from git@github-isl-01.ca.com:garju09/docker-sleep.git will be created
* The resulting image will be pushed to image stream "docker-sleep:latest"
* Every time "centos:centos7" changes a new build will be triggered
* WARNING: this source repository may require credentials.
Create a secret with your git credentials and use 'set build-secret' to assign it to the build config.
* This image will be deployed in deployment config "docker-sleep"
* The image does not expose any ports - if you want to load balance or send traffic to this component
you will need to create a service with 'expose dc/docker-sleep --port=[port]' later
* WARNING: Image "centos:centos7" runs as the 'root' user which may not be permitted by your cluster administrator
--> Creating resources ...
imagestream "centos" created
imagestream "docker-sleep" created
buildconfig "docker-sleep" created
deploymentconfig "docker-sleep" created
--> Success
Build scheduled, use 'oc logs -f bc/docker-sleep' to track its progress.
Run 'oc status' to view your app.
为什么 new-app
没有使用我指定的 --source-secret
?
更新:
> oc version
oc v3.7.0+7ed6862
kubernetes v1.7.6+a08f5eeb62
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://127.0.0.1:8443
openshift v3.7.0+7ed6862
kubernetes v1.7.6+a08f5eeb62
我在这里的主要信息来源是以下博客:https://blog.openshift.com/private-git-repositories-part-2a-repository-ssh-keys/
请注意, key 上没有密码,我尝试了各种其他排列,包括以下排列。唯一适用于项目创建的是 ssh-add
。奇怪的是,项目创建后,我可以清空 ssh-agent
并毫无问题地构建操作系统:
oc secrets new-sshauth sleep-key-rsa --ssh-privatekey=/home/julio/.ssh/sleep-key_rsa
oc secrets link builder sleep-key-rsa
oc new-app --source-secret=sleep-key-rsa https://github-isl-01.ca.com/garju09/docker-sleep.git
但上面的方法不起作用,因为 https 需要在我们的部署中进行身份验证。
oc secrets new-sshauth sleep-key-rsa --ssh-privatekey=/home/julio/.ssh/sleep-key_rsa
oc secrets link builder sleep-key-rsa
oc new-app git@github-isl-01.ca.com:garju09/docker-sleep.git
同样失败。
更新 2:我创建了一个 github 存储库来复制问题并显示我正在使用的脚本:https://github.com/julio-garcia-fc/docker-sleep
如果您克隆它并拥有 oc 3.7,您应该能够运行 oc.sh
,您会看到它失败了。
最佳答案
您需要说明构建器服务帐户可以访问您的 key 。见:
以及该系列中的所有其他博文。
你需要的命令是:
oc secrets link builder sleep-key-rsa
关于github - 为什么 openshift oc new-app 没有使用我提供的 --source-secret?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47839117/
基于 Docker 镜像在 OpenShift 上创建新应用程序的语法有点令人困惑: Usage: oc new-app (IMAGE | IMAGESTREAM | TEMPLATE | PAT
前言 objective-c 不能动态的添加一些属性到对象上,和其他的一些原生支持这点的语言不一样。所以之前你都不得不努力为未来要增加的变量预留好空间。在 mac os x 10.6 中,obje
我正在使用cloudformation脚本,我成功执行oc login -u user -p password 我的脚本继续进行,一段时间后我遇到了问题,因为我好像没有登录过。$(oc whoami)
尝试绘制“^ oC”,但不断出现错误:“错误:“ggplot”中出现意外的“^” 但是,如果我放置“R ^ {o} C”是可行的。请参阅下面的代码段。第一个代码不起作用,第二个代码不起作用,但是对于y
我想根据特定部署为 openshift 模板提供一组不同的参数。我一直在使用 oc new-app -f my-template.yml -p P1="p1-override-value" -p P2
1.每个对象只有哈希值,不等于其他对象? NSObject *obj1 = [[NSObject alloc] init]; NSObject *obj2 = [[NSObject alloc] in
这里有两种方法那个更好?没看懂... 谢谢! - (void)setName:(NSString *)name { //one way [_name release]; [na
我正在尝试在本地 Virtualbox centos 7.4 上设置 openshift origin。这是一个仅用于学习目的的多合一环境。我遵循了确切的文件: https://docs.okd.io
我还应该在单元测试中释放对象吗? 我注意到在Apple的“iPhoneUnitTests”示例项目中,设置方法中的对象是[[object alloc] init],但从未在单元测试中的任何地方发布?
我知道 oc tag -d python:3.5将仅删除 3.5 标签。但是我想使用 oc 命令从同一图像流中删除多个旧标签。 例如图像流 phython:rel-1、phython:rel-2、ph
从这个问题你可以看出我是一个新手。 目前为了获取我的 pod 的日志,我正在做一个...... oc logs -f api-myapp-v1-48-cdrs2 这向我显示了日志中的所有内容。我怎么能
我正在为 Sharepoint 构建几个 Web 部件,我需要显示用户的存在(来自 Lync/OCS)。当我使用时: " + user.Name + " 它工作正常,我通过许多功能(姓名、
我有一个工具类。工具类写了lz4解压的方法,但是解压受控,不知道哪里出了问题(libcompression.tbd和#include "compression.h"都有)。下面是代码: + (NSDa
效果图 实现思路 要实现绘图,通常需要自定义一个uiview的子类,重写父类的- (void)drawrect:(cgrect)rect方法,在该方法中实现绘图操作 若想显示下载进度,只需要
我正在尝试 okd,但在 oc 集群向上端口检查步骤中它对我来说失败了。出于礼貌,调试输出不是很冗长。您知道要寻找什么吗? $ oc cluster up Getting a Docker clien
我在 Ubuntu 16.04.3 LTS 上安装了 Docker 和 OpenShift 客户端 [vagrant@desktop:~] $ docker --version Docker vers
有什么区别rhc 和 oc CLI 工具? 正如我所见,他们的做法几乎相同: oc : The OpenShift CLI exposes commands for managing your app
我尝试在 openshift pod 上运行远程命令来删除特定目录中的一些文件,以下命令有效: oc exec mypod -i -t -- rm -f /tmp/mydir/1.txt 但是,我无
当前,我们正在使用以下命令在Openshift中更新configmap设置(此后,我们将重新启动Pod,以使设置生效): oc apply -f configmap.yml 我的问题是: 该命令将删除
怎么把RLMObject转换成NSDictionary? 这是我的代码: NSString *imei = [Utils getUUID]; NSPredicate *pred = [NSPredic
我是一名优秀的程序员,十分优秀!