Skip to content

AttributeError: 'authHeader' object has no attribute 'Scope' #16

Open
@d4l3k

Description

@d4l3k

Ran into this bug when trying to use password authentication. Seems to just be a small typo:

dst = reggie.NewClient(
    dst_endpoint,
    reggie.WithUsernamePassword(
        "AWS",
        password
    ),
)
req = dst.NewRequest(
    "POST", "/v2/<name>/uploads/",
    reggie.WithName(dst_name),
)
resp = src.Do(req)
print(resp.headers)
Traceback (most recent call last):

    resp = src.Do(req)
  File "/home/tristanr/venvs/torchx/lib/python3.9/site-packages/opencontainers/distribution/reggie/client.py", line 168, in Do
    response = self.retryRequestWithAuth(req, response)
  File "/home/tristanr/venvs/torchx/lib/python3.9/site-packages/opencontainers/distribution/reggie/client.py", line 199, in retryRequestWithAuth
    elif h.Scope:
AttributeError: 'authHeader' object has no attribute 'Scope'

Think it should be scope

https://github.com/vsoch/oci-python/blob/master/opencontainers/distribution/reggie/client.py#L231

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions