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

Pushing to Azure Container Registry fails with "401 Unauthorized" even though "docker push" works #2488

Closed
chanseokoh opened this issue May 21, 2020 · 0 comments · Fixed by #2489
Assignees
Milestone

Comments

@chanseokoh
Copy link
Member

chanseokoh commented May 21, 2020

Even though docker push francium25.azurecr.io/hello-world works, Jib cannot push to Azure Container Registry. Note Jib does retrieve Azure credentials from ~/.docker/config.json.

[INFO] Using credentials from Docker config (.../.docker/config.json) for francium25.azurecr.io/hello-world

Notably, ~/docker/config.json has identitytoken that other auths entries don't have. I wonder if this is basically the same issue we've taken care of when using Azure credential helpers (#1490).

    "auths": {
       "francium25.azurecr.io": {
            "auth": "...",
            "identitytoken": "..."
        },
        "quay.io": {
            "auth": "..."
        },

Full log:

[INFO] Containerizing application to francium25.azurecr.io/hello-world...
[WARNING] Base image 'gcr.io/distroless/java:8' does not use a specific image digest - build may not be reproducible
[INFO] Using credentials from Docker config (.../.docker/config.json) for francium25.azurecr.io/hello-world
[INFO] Using base image with digest: sha256:f59b26c5ecc735514a38afbf845214383c4e2ba1fdd15a76225339b8ab7da8ef
[INFO] Executing tasks:
[INFO] [=======                       ] 22.2% complete
[INFO] > pulling base image manifest
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.530 s
[INFO] Finished at: 2020-05-21T13:50:02-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.2.0:build (default-cli) on project helloworld: Build image failed, perhaps you should make sure your credentials for 'francium25.azurecr.io/hello-world' are set up correctly. See https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#what-should-i-do-when-the-registry-responds-with-unauthorized for help: Unauthorized for francium25.azurecr.io/hello-world: 401 Unauthorized -> [Help 1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant