Skip to content

[Issue] I can pull images using docker but can't pull using regctl from private registry #865

@zkryakgul

Description

@zkryakgul

Current Behavior

I can login and pull images from our company private registry using docker client. But When I try to perform same operation with regctl I'm getting unauthorized error.

Expected Behavior

I should pull&push images to the private registry like in the docker client.

Steps To Reproduce

regctl -v debug image copy -v debug  registry-priv.company.com/devops/alpine/jmeter:5.6 swr.ap-southeast-3.myhuaweicloud.com/devops/jmeter

Version

VCSTag:     v0.7.2
VCSRef:     6b1f7bd9a3b2972605f04a534143f7fed522b680
VCSCommit:  6b1f7bd9a3b2972605f04a534143f7fed522b680
VCSState:   clean
VCSDate:    2024-11-04T14:37:25Z
Platform:   linux/amd64
GoVer:      go1.23.2
GoCompiler: gc

Environment

  • Running as binary or container: Downloaded binary and executed on Ubuntu 22.04 Server Host
  • Host platform: Linux
  • Registry description: Harbor based registry

Anything else

Debug Logs:

# Copying image registry-priv ----> SWR
# COMMAND: regctl -v debug image copy -v debug  registry-priv.company.com/devops/alpine/jmeter:5.6 swr.ap-southeast-3.myhuaweicloud.com/devops/jmeter
DEBU[0000] Loading docker config                         blobChunk=0 blobMax=0 helper= hostname=swr.ap-southeast-3.myhuaweicloud.com mirrors="[]" name=swr.ap-southeast-3.myhuaweicloud.com pathPrefix= repoAuth=false tls=enabled user=myswruser
DEBU[0000] Loading docker config                         blobChunk=0 blobMax=0 helper= hostname=registry-priv.company.com mirrors="[]" name=registry-priv.company.com pathPrefix= repoAuth=false tls=enabled user=myuser
DEBU[0000] Loading host config                           blobChunk=0 blobMax=0 helper= hostname=registry-priv.company.com mirrors="[]" name=registry-priv.company.com pathPrefix= repoAuth=true tls=insecure user=myuser
WARN[0000] Changing login password for registry          host=registry-priv.company.com
WARN[0000] Changing TLS settings for registry            host=registry-priv.company.com new=insecure orig=enabled
DEBU[0000] Loading host config                           blobChunk=524288 blobMax=524288 helper= hostname=swr.ap-southeast-3.myhuaweicloud.com mirrors="[]" name=swr.ap-southeast-3.myhuaweicloud.com pathPrefix= repoAuth=false tls=insecure user=myswruser
DEBU[0000] regclient initialized                         VCSRef=6b1f7bd9a3b2972605f04a534143f7fed522b680 VCSTag=v0.7.2
DEBU[0000] Image copy                                    digest-tags=false recursive=false source="registry-priv.company.com/devops/alpine/jmeter:5.6" target="swr.ap-southeast-3.myhuaweicloud.com/devops/jmeter:latest"
DEBU[0000] Auth request parsed                           challenge="[{bearer map[realm:https://swr.ap-southeast-3.myhuaweicloud.com/swr/auth/v2/registry/auth/ scope:repository:devops/jmeter: service:dockyard]}]"
DEBU[0000] Auth scope added                              host=swr.ap-southeast-3.myhuaweicloud.com scope="repository:devops/jmeter:pull"
DEBU[0002] Auth request parsed                           challenge="[{bearer map[realm:http://registry-priv.company.com/service/token scope:repository:devops/alpine/jmeter:pull service:harbor-registry]}]"
DEBU[0002] Auth request parsed                           challenge="[{bearer map[error:insufficient_scope realm:http://registry-priv.company.com/service/token scope:repository:devops/alpine/jmeter:pull service:harbor-registry]}]"
DEBU[0002] Failed to handle auth request                 Err=unauthorized URL="https://registry-priv.company.com/v2/devops/alpine/jmeter/manifests/5.6"
copy failed, error getting source: failed to get manifest registry-priv.company.com/devops/alpine/jmeter:5.6: unauthorized

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeedback-neededFeedback is needed from the OP

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions