podman: podman search in private registry fails : error unauthorized: authentication required

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Steps to reproduce the issue:

podman search debian
ERRO[0000] error getting search results from v2 endpoint “registry.bob.io”: unable to retrieve auth token: invalid username/password: errors: denied: requested access to the resource is denied unauthorized: authentication required INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED docker.io docker.io/library/debian Debian is a Linux distribution that’s compos… 3392 [OK]
docker.io docker.io/smartentry/debian debian with smartentry 4 [OK]

Describe the results you received: ERRO[0000] error getting search results from v2 endpoint “registry.bob.io”: unable to retrieve auth token: invalid username/password: errors: denied: requested access to the resource is denied unauthorized: authentication required INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED

Describe the results you expected: retrieve images hosted in the repository : same images that have been pull and push using podman pull / podman push

Additional information you deem important (e.g. issue happens only occasionally): A auth file as been set which helped to push with podman

~/.config/containers  cat auth.json
{ “auths”: { registry.bob.io": { “auth”: “xxxxxx=” } } }

Output of podman version:

podman version
Version:            1.8.0
RemoteAPI Version:  1
Go Version:         go1.10.1
OS/Arch:            linux/amd64

Output of podman info --debug:

 boogie@boogieland  ~/.config/containers  podman info --debug
debug:
  compiler: gc
  git commit: ""
  go version: go1.10.1
  podman version: 1.8.0
host:
  BuildahVersion: 1.13.1
  CgroupVersion: v1
  Conmon:
    package: 'conmon: /usr/libexec/podman/conmon'
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.10, commit: unknown'
  Distribution:
    distribution: ubuntu
    version: "18.04"
  IDMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  MemFree: 10278772736
  MemTotal: 16659619840
  OCIRuntime:
    name: runc
    package: 'runc: /usr/sbin/runc'
    path: /usr/sbin/runc
    version: 'runc version spec: 1.0.1-dev'
  SwapFree: 1023406080
  SwapTotal: 1023406080
  arch: amd64
  cpus: 8
  eventlogger: journald
  hostname: boogieland
  kernel: 5.3.0-40-generic
  os: linux
  rootless: true
  slirp4netns:
    Executable: /usr/bin/slirp4netns
    Package: 'slirp4netns: /usr/bin/slirp4netns'
    Version: |-
      slirp4netns version 0.4.3
      commit: unknown
  uptime: 33m 3.29s
registries:
  search:
  - paasregistry.ilius.io
  - docker.io
  - quay.io
store:
  ConfigFile: /home/boogie/.config/containers/storage.conf
  ContainerStore:
    number: 4
  GraphDriverName: vfs
  GraphOptions: {}
  GraphRoot: /home/boogie/.local/share/containers/storage
  GraphStatus: {}
  ImageStore:
    number: 4
  RunRoot: /run/user/1000/containers
  VolumePath: /home/boogie/.local/share/containers/storage/volumes

Package info (e.g. output of rpm -q podman or apt list podman):

sudo apt list podman
[sudo] password for boogie: 
Listing... Done
podman/unknown,now 1.8.0~7 amd64 [installed]

Additional environment details (AWS, VirtualBox, physical, etc.):

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (7 by maintainers)

Most upvoted comments

@cybernet Which podman version you are using? This seems the same issues as https://bugzilla.redhat.com/show_bug.cgi?id=1867495

@cybernet Could you try --log-level to check which authfile the credential is returning from? Which Podman verison you are using?

# podman --log-level debug login docker.io
INFO[0000] Setting parallel job count to 13             
DEBU[0000] Returning credentials from /run/containers/0/auth.json 
Authenticating with existing credentials...

[root@cent0 ~]# podman --log-level debug login docker.io DEBU[0000] Returning credentials from /run/user/0/containers/auth.json Authenticating with existing credentials… DEBU[0000] Looking for TLS certificates and private keys in /etc/docker/certs.d/docker.io DEBU[0000] GET https://registry-1.docker.io/v2/
DEBU[0000] Ping https://registry-1.docker.io/v2/ status 401 DEBU[0000] GET https://auth.docker.io/token?account=cybernet2u&service=registry.docker.io DEBU[0000] GET https://registry-1.docker.io/v2/
Existing credentials are valid. Already logged in to docker.io