Skip to content

Commit

Permalink
Update push.go
Browse files Browse the repository at this point in the history
fix scope action only has pull when get service token in executing cmd `org push`

Signed-off-by: hopegi <[email protected]>
  • Loading branch information
hopegi authored Dec 27, 2024
1 parent 9eece43 commit e7bc5aa
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 e7bc5aa

Please sign in to comment.