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

Inform user to use Registry Environment variables #337

Closed
alexgaganashvili opened this issue Feb 17, 2022 · 2 comments
Closed

Inform user to use Registry Environment variables #337

alexgaganashvili opened this issue Feb 17, 2022 · 2 comments
Labels
carvel accepted This issue should be considered for future work and that the triage process has been completed enhancement This issue is a feature request

Comments

@alexgaganashvili
Copy link

Hi,

When copying from a public registry to a registry that requires authentication and setting IMGPKG_USERNAME and IMGPKG_PASSWORD env vars, imgpkg also uses the credentials to authenticate with the public registry, which causes it to respond with 401 Unauthorized.
One way to solve the problem would be for me to use IMGPKG_REGISTRY_HOSTNAME_0, IMGPKG_REGISTRY_USERNAME_0, and IMGPKG_REGISTRY_PASSWORD_0 env vars for the registry that requires authentication instead.
The other solution would be to use docker login (provided I have docker installed) without setting those two env vars. In the latter approach, I don't run into the described problem when copying between two registries,
since ~/.docker/config lists the registry which requires authentication. Whereas IMGPKG_USERNAME and IMGPKG_PASSWORD appear to be used both with a source and destination registry.
So, in a scenario, when I copy between two registries, and I execute imgpkg copy --help to find out how to do it, it would be great to see a recommendation to use IMGPKG_REGISTRY_HOSTNAME_<#>, IMGPKG_REGISTRY_USERNAME_<#>, and IMGPKG_REGISTRY_PASSWORD_<#> env vars
right under the line # Copy image dkalinin/app1-image to another registry (or repository) in the examples section.

Thanks.

@alexgaganashvili alexgaganashvili added carvel triage This issue has not yet been reviewed for validity enhancement This issue is a feature request labels Feb 17, 2022
@alexgaganashvili
Copy link
Author

PR: #336

@joaopapereira joaopapereira added carvel accepted This issue should be considered for future work and that the triage process has been completed and removed carvel triage This issue has not yet been reviewed for validity labels Feb 18, 2022
@joaopapereira joaopapereira changed the title Use of IMGPKG_USERNAME and IMGPKG_PASSWORD when copying between two registries Inform user to use Registry Environment variables Feb 18, 2022
@joaopapereira
Copy link
Member

Released in version 0.25.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
carvel accepted This issue should be considered for future work and that the triage process has been completed enhancement This issue is a feature request
Projects
None yet
Development

No branches or pull requests

2 participants