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

--registry-config not working for destination registry in oras cp #846

Closed
1 task done
qweeah opened this issue Mar 2, 2023 · 0 comments · Fixed by #847
Closed
1 task done

--registry-config not working for destination registry in oras cp #846

qweeah opened this issue Mar 2, 2023 · 0 comments · Fixed by #847
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@qweeah
Copy link
Contributor

qweeah commented Mar 2, 2023

What happened in your environment?

Suppose $REG points to a registry which requires login for both push and pull. When using below commands to copy an image from $REPO1 to $REPO2, the execution will fail with 401

oras login $REG --registry-config config.json
# input username and password, or token
oras cp $REG/$REPO1:v1 $REG/$REPO2:v1 --registry-config config.json
# 401 error

What did you expect to happen?

oras cp should support --from-registry-config and --to-registry-config for source and destination registry.

How can we reproduce it?

# 0. have a registry that requires login for both pull and push
# 1. login $REG and store the cred to config.json
oras login $REG --registry-config config.json

# 2. copy between repositories
oras cp $REG/$REPO1:v1 $REG/$REPO2:v1 --registry-config config.json
# will get 401 error

What is the version of your ORAS CLI?

Version: 1.0.0-rc.1
Go version: go1.19.5
Git commit: a98931b
Git tree state: clean

What is your OS environment?

ubunto 20.04

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.
@qweeah qweeah added bug Something isn't working enhancement New feature or request labels Mar 2, 2023
@qweeah qweeah added this to the v1.0.0-rc.2 milestone Mar 2, 2023
@qweeah qweeah self-assigned this Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant