Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kaniko produces " UNAUTHORIZED: authentication required" error when building an integration route with Dockerhub #1572

Closed
omarsmak opened this issue Jun 26, 2020 · 1 comment
Labels
area/build-operator Related to the internal image build operator status/stale

Comments

@omarsmak
Copy link
Member

If we setup camel-k with docker registry enabled and publish strategy Kaniko, e.g:

kamel install --registry docker.io --organization<user-id> --registry-secret my-docker-hub-pass --force --build-publish-strategy=Kaniko

Building a sample integration using the command kamel run Sample.java --dev , will produce the following error in Kaniko container:

~ » kubectl logs -f camel-k-kit-brqdau6uajci6uhb5uu0-builder kaniko                                                                                                                                                                  oalsafi@LT-C02YV0PGLVDR
INFO[0001] Resolved base name adoptopenjdk/openjdk11:slim to adoptopenjdk/openjdk11:slim
INFO[0001] Resolved base name adoptopenjdk/openjdk11:slim to adoptopenjdk/openjdk11:slim
INFO[0001] Retrieving image manifest adoptopenjdk/openjdk11:slim
INFO[0002] Retrieving image manifest adoptopenjdk/openjdk11:slim
INFO[0004] Built cross stage deps: map[]
INFO[0004] Retrieving image manifest adoptopenjdk/openjdk11:slim
INFO[0004] Retrieving image manifest adoptopenjdk/openjdk11:slim
INFO[0005] Unpacking rootfs as cmd ADD . /deployments requires it.
INFO[0012] Taking snapshot of full filesystem...
INFO[0021] Using files from context: [/builder/kit-brqdau6uajci6uhb5uu0/context]
INFO[0021] ADD . /deployments
INFO[0021] Taking snapshot of files...
INFO[0022] USER 1000
INFO[0022] cmd: USER
error pushing image: failed to push to destination docker.io/omarsmak/camel-k-kit-brqdau6uajci6uhb5uu0:788576: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:omarsmak/camel-k-kit-brqdau6uajci6uhb5uu0 Type:repository] map[Action:push Class: Name:omarsmak/camel-k-kit-brqdau6uajci6uhb5uu0 Type:repository] map[Action:pull Class: Name:adoptopenjdk/openjdk11 Type:repository]]

If I use Spectrum publish strategy, everything works fine.

Please note, I am using Azure Kubernetes Cloud (AKS)

@lburgazzoli lburgazzoli added area/build-operator Related to the internal image build operator buildah and removed buildah labels Jun 26, 2020
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-operator Related to the internal image build operator status/stale
Projects
None yet
Development

No branches or pull requests

2 participants