Skip to content

Authorization failure with unicode registry username #2870

@linxiulei

Description

@linxiulei

Description

Ctr fails to pull image with unicode registry username. Docker hub is not allowed using unicode charset other than letters, however some registries support it.

Steps to reproduce the issue:

  1. setup a registry account with unicode charset (e.g. chinese characters)
  2. bin/ctr images pull -u "世界:你好" registry.cn-shanghai.aliyuncs.com/fake/name:latest

Describe the results you received:

ctr: failed to resolve reference "registry.cn-shanghai.aliyuncs.com/fake/name:latest": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

Describe the results you expected:

registry.cn-shanghai.aliyuncs.com/fake/name:latest: resolving      |--------------------------------------|
elapsed: 0.2 s                                                          total:   0.0 B (0.0 B/s)                 
registry.cn-shanghai.aliyuncs.com/fake/name:latest:1207:           resolved       |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:: exists         |++++++++++++++++++++++++++++++++++++++|
config-sha256::   exists         |++++++++++++++++++++++++++++++++++++++|
layer-sha256:    done           |++++++++++++++++++++++++++++++++++++++|
layer-sha256::    done           |++++++++++++++++++++++++++++++++++++++|
layer-sha256::    done           |++++++++++++++++++++++++++++++++++++++|
elapsed: 23.2s                                                                    total:  645.2  (27.8 MiB/s)    
unpacking linux/amd64 sha256:...
done

Output of containerd --version:

containerd github.com/containerd/containerd v1.2.0-88-g75c490c5.m 75c490c5c4fa2bbd40c287cfe8f7683bc215bdea.m

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions