question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't match GCR auth config in ~/.docker/config.json

See original GitHub issue

Description

DMP can’t match an existing auth section in ~/.docker/config.json to GCR.

Info

  • d-m-p version : 0.25.2
  • Docker version : 18.03.1-ce, build 9ee9f40

Reproduce bug

Log to GCR:

docker login eu.gcr.io

Try to use the auth section in ~/.docker/config.json:

fabric8:push -Ddocker.push.registry=eu.gcr.io/awesome

The auth configuration does not match "eu.gcr.io" != "eu.gcr.io/awesome"

[INFO] --- fabric8-maven-plugin:3.5.38:push (default-cli) @ qs-framework-fabric8-python-samples-echo ---
[DEBUG] F8> AuthConfig: no credentials found

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

1reaction
rhusscommented, Jun 14, 2018

“eu.gcr.io/awesome” doesn’t look like a registry, its the registry + repository name. Both concepts are clearly separate within d-m-p, so my question to you is why is “awesome” not part of the image name (as specified within the image configuration), using only “eu.gcr.io” as registry name ?

0reactions
presidentiocommented, Dec 4, 2020

I have a similar issue, but with index.docker.io. Steps to Reproduce:

  1. Login to docker hub using docker login
  2. Make sure you have https://index.docker.io/v1/ entry in ~/.docker/config.json file
  3. Create docker file that starts with FROM index.docker.io/adoptopenjdk/openjdk11:jre-11.0.6_10-alpine
  4. Run maven command to build this image using maven-docker-plugin with -Ddocker.verbose=true -Dorg.slf4j.simpleLogger.log.io.fabric8.maven.docker=debug

Actual result: [DEBUG] DOCKER> AuthConfig: no credentials found Expected result: https://index.docker.io/v1/ authentication used to pull the image

As I understand the root cause of my issue is that docker-maven-plugin use exact string comparison of docker registry from image name and registry name from ~/.docker/config.json file. In my case: "https://index.docker.io/v1/".equals("index.docker.io") is false

Read more comments on GitHub >

github_iconTop Results From Across the Web

gcloud auth configure-docker fail (config.json could not be ...
This error means that gcloud couldn't find the docker version. What happens when you run $ docker version --format '{{.Client.Version}}' ? – ...
Read more >
unable to pull image from google container registry - GitLab
I'm trying to use the runner 'docker-machine' to pull images from my ... -p "$(cat /etc/google/auth/application_default_credentials.json)" ...
Read more >
Set up authentication for Docker | Artifact Registry ...
This page describes how to configure Docker to authenticate to Artifact Registry Docker repositories. You do not need to configure authentication for Cloud ......
Read more >
Configure registry.json to enforce sign-in
After a registry.json file is configured on a user's machine, Docker Desktop prompts the user to sign in. If a user doesn't sign...
Read more >
Configuration of Container Registries - Argo CD Image Updater
GitHub Packages Registry ( docker.pkg.github.com ); GitLab Container Registry ( registry.gitlab.com ); Google Container Registry ( gcr.io ). Chances are, that ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found