Can't annotate secret for OpenShift private git repo deployment

1000 Views Asked by At

I tried to follow this guide on deploying an app on OpenShift from my private repository on GitLab. I tried using an SSH authentication key as a deploy key, GitLab personal access token with api scope and entering my GitLab credentials directly.

I've been failing at the step of adding annotation with repository URI to the secret using this command.

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

I'm getting the following error as a result.

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

Result of oc version is as follows, matching the server version shown both in cli and on the about page in the OpenShift web console.

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
0

There are 0 best solutions below