Skip to content

unexpected error thrown when pushing to a registry without logging in #1694

Closed

Description

@qweeah

What happened in your environment?

I am pushing to my registry without logging in, the error returned suggested nothing wrong with login.

> oras push $REGISTRY/test:v0.1 $FILE




panic: sync/atomic: compare and swap of inconsistently typed value into Value

goroutine 44 [running]:
sync/atomic.(*Value).CompareAndSwap(0xc000210260, {0x0, 0x0}, {0x9767e0, 0xc000336c80})
        /home/azureuser/go/pkg/mod/golang.org/[email protected]/src/sync/atomic/value.go:174 +0x150
oras.land/oras-go/v2/internal/syncutil.Go[...].func1.func2()
        /home/azureuser/go/pkg/mod/oras.land/oras-go/[email protected]/internal/syncutil/limit.go:86 +0xe6
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /home/azureuser/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:79 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 23
        /home/azureuser/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:76 +0x93

What did you expect to happen?

Should show

  1. Progress of what has been uploaded
  2. Error code returned by the registry of the unauthenticated request.

How can we reproduce it?

  1. Logout your registry.
  2. Run oras push on the logged-out registry .

What is the version of your ORAS CLI?

I build from main branch

✗ oras version
Version:        1.3.0-beta.2+unreleased
Go version:     go1.24.0
OS/Arch:        linux/amd64
Git commit:     c257deee176ea66d92bbc19769c87ff6cf2377fa

What is your OS environment?

Ubuntu 20.04

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.

Activity

  1. added
    bug
    triage
    on Apr 16, 2025
  2. added
    duplicate
    and removed
    triage
    on Apr 16, 2025
  3. shizhMSFT commented on Apr 16, 2025

    @shizhMSFT
    Contributor

    Duplicate of #1659

  4. added this to the v1.3.0-Beta.3 milestone on Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugduplicate

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions