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

fix!: support multiple config files in oras cp #847

Merged
merged 3 commits into from
Mar 2, 2023

Conversation

qweeah
Copy link
Contributor

@qweeah qweeah commented Mar 2, 2023

What this PR does / why we need it:
This PR fixes a bug in oras cp: Registry credential configuration file specified via --registry-config will not work for destination registry target.

This pr introduces flags, --from-registry-config and --to-registry-config, for source and destination registry respectively when copying. Since docker config only supports storing one credential per config file, this feature will be useful when copying between repositories with different token scope requirement in the same registry.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #846

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shizhMSFT shizhMSFT merged commit f4842ec into oras-project:main Mar 2, 2023
@qweeah qweeah deleted the fix-config branch March 6, 2023 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--registry-config not working for destination registry in oras cp
2 participants