Skip to content

Commit

Permalink
fix: scope action only has pull when get service token in executing c…
Browse files Browse the repository at this point in the history
…md org push (#1600)

Signed-off-by: hopegi <[email protected]>
  • Loading branch information
hopegi authored Jan 15, 2025
1 parent 9eece43 commit b36e543
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/oras/root/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func runPush(cmd *cobra.Command, opts *pushOptions) error {
copy := func(root ocispec.Descriptor) error {
// add both pull and push scope hints for dst repository
// to save potential push-scope token requests during copy
ctx = registryutil.WithScopeHint(ctx, dst, auth.ActionPull, auth.ActionPush)
ctx = registryutil.WithScopeHint(ctx, originalDst, auth.ActionPull, auth.ActionPush)

if tag := opts.Reference; tag == "" {
err = oras.CopyGraph(ctx, union, dst, root, copyOptions.CopyGraphOptions)
Expand Down

0 comments on commit b36e543

Please sign in to comment.