我试图在GitLab上的私有存储库中关于在OpenShift上部署应用程序时遵循this guide . 我尝试使用SSH身份验证密钥作为部署密钥,使用带有api作用域的GitLab个人访问令牌并直接输入我的GitLab凭据 .

我一直在使用此命令向存储库URI添加注释的步骤失败 .

$ oc annotate secret/mysecretname \
    'build.openshift.io/source-secret-match-uri-1=https://gitlab.com/username/reponame.git'

结果我得到以下错误 .

error: at least one annotation update is required
See 'oc annotate -h' for help and examples.
build.openshift.io/source-secret-match-uri-1=https://gitlab.com/username/reponame.git

oc version 的结果如下所示,与cli和OpenShift Web控制台中的about页面上显示的服务器版本相匹配 .

oc v3.10.9
kubernetes v1.10.0+b81c8f8
features: Basic-Auth

Server https://api.starter-us-east-1.openshift.com:443
openshift v3.10.9
kubernetes v1.10.0+b81c8f8