Issue
On my local workstation I'm using the following:
- Openshift: 4.2.13
- CRC version: 1.4.0+d5bb3a3
I'm trying to use the S2I process to deploy an application to my local cluster starting from a base image and a source code stored in a github repository.
To do that I have:
- Created a
kubernetes.io/ssh-auth
secret for pulling the source code using the UI - Created a
kubernetes.io/dockerconfigjson
secret (calledquayio
) for pulling the image from quay.io - Linked the registry secret to builder and default service accounts
oc secret link builder quayio --for=mount,pull
oc secret link default quayio --for=mount,pull
- Created the application
oc new-app --name=my-liberty-app base-image:1.0~GITHUB_REPO_PLACEHOLDER#master --context-dir=app --source-secret=oc-liberty-github
But when the build starts I get this error:
Cloning "git@GITHUB_REPO_PLACEHOLDER" ...
Commit: f14d294a3e2e06e01db9034311035af5df9f3036 (App custom scripts)
Author: user
Date: Mon Mar 2 14:30:09 2020 +0100
Caching blobs under "/var/cache/blobs".
Warning: Pull failed, retrying in 5s ...
Warning: Pull failed, retrying in 5s ...
Warning: Pull failed, retrying in 5s ...
error: build error: After retrying 2 times, Pull image still failed due to error: errors:
denied: requested access to the resource is denied
unauthorized: authentication required
Does anyone know why this happens?
Solution
I found the problem. The image stream tag was wrong.
Here the correct oc command:
oc new-app --name=my-liberty-app base-image:latest~GITHUB_REPO_PLACEHOLDER#master --context-dir=app --source-secret=oc-liberty-github
Answered By - Leonardo Carraro Answer Checked By - Willingham (WPSolving Volunteer)