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

Dockerhub configuration documentation is possibly incorrect/lacking #2356

Open
gilbahat opened this issue Jan 7, 2023 · 3 comments
Open
Labels
area/documentation For all bugs related to documentation good first issue Good for newcomers help wanted Looking for a volunteer! kind/bug Something isn't working kind/enhancement New feature or request priority/p2 High impact feature/bug. Will get a lot of users happy

Comments

@gilbahat
Copy link

gilbahat commented Jan 7, 2023

Actual behavior
When using the documented example to create a dockerhub secret, I got "unauthorized" errors. These disappeared after configuing config.json differently than suggested.

Expected behavior
The documented example should have worked for me, or otherwise several alternatives should have been suggested.

To Reproduce

  1. create a new dockerhub secret as suggested in the documentation
  2. failure to login might be observed.

Additional Information
This is the format that eventually worked for me:

{
  "auths": {
    "https://index.docker.io/v1/": {
      "username": "REDACTED",
      "password": "REDACTED",
      "email": "REDACTED",
      "auth": "REDACTED"
    }
  }
}

using only 'auth' did not work. password/username might be redundant, but email definitely adds otherwise-missing information

@aaron-prindle aaron-prindle added area/documentation For all bugs related to documentation priority/p2 High impact feature/bug. Will get a lot of users happy kind/enhancement New feature or request kind/bug Something isn't working good first issue Good for newcomers help wanted Looking for a volunteer! labels May 30, 2023
@onlineque
Copy link

I am struggling with the very same thing. Any help would be greatly appreciated ;-)
Are those values for username, password, email and auth all BASE64 encoded ? Or what's the correct way ? It's not clear from the description. Thanks !

@jhawk7
Copy link

jhawk7 commented Sep 19, 2023

Is there any update on this? The documentation points out that the v1 endpoint is deprecated, but its still used in the examples to configure the docker hub registry. The documentation doesn't seem to have any examples on how to configure kaniko with the v2 endpoint.

@whatnick
Copy link

This actually works in practice through some magic in https://github.com/google/go-containerregistry/blob/dbcd01c402b2f05bcf6fb988014c5f37e9b13559/pkg/v1/remote/write.go makes it work with the configuration stating v1 . This does not work when tagged with v2. v1 API is indeed deprecated and Kaniko docs need to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation For all bugs related to documentation good first issue Good for newcomers help wanted Looking for a volunteer! kind/bug Something isn't working kind/enhancement New feature or request priority/p2 High impact feature/bug. Will get a lot of users happy
Projects
None yet
Development

No branches or pull requests

5 participants