Reproduce private pulling issue + poc a fix #236
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow-up to #126 (comment)
I spent some time exploring to understand if something was wrong on my side or if there was an issue and managed to pull private images with the crude fix that'll find here.
The code that handles the authentication seems to make assumptions about
~/.docker/config.json
that do not match the structure of that file.But the original code tries to look for
us.gcr.io
if that's what I set to theregistry
attr on theoci_pull
. It then takes a look at thecredsStore
which will is set todesktop
and doesn't know how to find my private image.The fix is to instead iterate on the
credHelpers
if we don't find a matching entry under"auths"
, which I very crudely implemented.I have included in my commit the modifications I did to test the code locally, which allowed me to successfully pull the image.
At this stage, I think it's best for me to reach out, as I don't know what would be the best solution to write a proper e2e test for such a patch. With some guidance, I could implement the fix properly, though I'm totally okay if you want to take over.