How to Solve Error Message denied: requested access to the resource is denied upon pulling image using podman

Posted on

Introduction

This article is just a simple article for pointing out how to solve an error message. Basically, for more information, this article has the same situation with two of other previous articles. In summary, those two article is showing error message appears when pulling image using podman. The first article exist in this link. It is an article with the title of ‘How to Solve Error Message manifest unknown: manifest unknown when executing podman to pull image’. The second article with the title of ‘How to Solve Error Message name unknown: Repo not found when executing podman to pull image’ exist in this link. The error message is exist as in the following ‘podman’ command execution :

[root@10 ~]# [root@10 ~]# podman pull localhost
? Please select an image:
  ▸ registry.fedoraproject.org/localhost:latest
    registry.access.redhat.com/localhost:latest
    registry.centos.org/localhost:latest
    docker.io/library/localhost:latest

Actually, the podman command execution is ‘podman pull localhost’. It is a command to order podman to pull an image with the name of ‘localhost’. Since the image repository does not exist as part of the image name, they command will trigger an output with the list of available image repository available. The list actually exist in the configuration. The following is the command execution :

[admin@10 ~]$ podman pull localhost
✔ docker.io/library/localhost:latest
Trying to pull docker.io/library/localhost:latest...
  denied: requested access to the resource is denied
Error: Error initializing source docker://localhost:latest: Error reading manifest latest in docker.io/library/localhost: errors:
denied: requested access to the resource is denied
unauthorized: authentication required
[admin@10 ~]$

So, what is the actual different from the previous two articles ?. Two of the previous articles which in this link is showing the error message of ‘manifest unknown: manifest unknown’ and the other one in this link with the error message of ‘name unknown: Repo not found’ has their own differentiation. The one with the error message of ‘manifest unknown: manifest unknown’ is using v2 configuration syntax pattern in its container configuration file. The other one with the error message of ‘name unknown: Repo not found’ is using v1 configuration syntax pattern in its container configuration file.

What about this article ?. It is also doing the same thing. Pulling an image from a server repository using podman. Well, actually there is more than that. Before pulling the image from a server reposity using podman, there is a login process previously. The following is the login process :

[admin@10 ~]$ podman login
Username: anonymous
Password:
Login Succeeded!
[admin@10 ~]$ podman pull localhost
✔ docker.io/library/localhost:latest
Trying to pull docker.io/library/localhost:latest...
  denied: requested access to the resource is denied
Error: Error initializing source docker://localhost:latest: Error reading manifest latest in docker.io/library/localhost: errors:
denied: requested access to the resource is denied
unauthorized: authentication required
[admin@10 ~]$

Solution

The solution for solving the above is actually the same with the one available in those two previous articles. One of the reason is not because of the access for pulling the resource which is the image is denied. One of the other reason is because of it does not exist. So, before pulling the image, search it first. The following is the command for searching the image using podman :

[admin@10 ~]$ podman search localhost
INDEX      NAME                                               DESCRIPTION                                      STARS   OFFICIAL  AUTOMATED
docker.io  docker.io/localhost1/flask                                                                          0
docker.io  docker.io/alo42/localhost-api                                                                       0
docker.io  docker.io/alo42/localhost-nginx                                                                     0
docker.io  docker.io/ishikawayasunori/localhost-registry                                                       0
docker.io  docker.io/ishikawayasunori/localhost-nginx                                                          0
docker.io  docker.io/ishikawayasunori/localhost-mysql                                                          0
docker.io  docker.io/laoliu/localhost                                                                          0
docker.io  docker.io/localhost1/filebeat                                                                       0
docker.io  docker.io/localhost8080/nginx                                                                       1
docker.io  docker.io/aakashiiitm/localhost                                                                     0
docker.io  docker.io/avinson/localhost-dot-run                Simple image for receiving webhooks within d...  0
docker.io  docker.io/bpholt/localhost-apache                  Host content on localhost with a self-signed...  0
docker.io  docker.io/localhostdev/rpi-samba                   Dockerized Samba service for Raspberry Pi 4      0
docker.io  docker.io/crazybber/localhost-registry                                                              0
docker.io  docker.io/jaskiteam/localhost                                                                       0
docker.io  docker.io/scottm/localhost-notebook                                                                 0
docker.io  docker.io/localhostss/auth-server                                                                   0
docker.io  docker.io/pkajal/localhostimage                                                                     0
docker.io  docker.io/localhostss/back-center                                                                   0
docker.io  docker.io/localhostss/eureka-server                                                                 0
docker.io  docker.io/ruebrettadcock/localhostlearning_gocode                                                   0
docker.io  docker.io/heycqing/localhost_node                  简单的node微型服务器                                     0
docker.io  docker.io/localhostss/user-center-mysql                                                             0
docker.io  docker.io/darkson/localhost                                                                         0
docker.io  docker.io/ajreams1/localhost                                                                        0
[admin@10 ~]$

Without having to specify the address of the image repository server, the output of the command execution for searching the image is so many. There are more results compared by having to specify the image server using the address of the image repository server as follows :

[admin@10 ~]$ podman search registry.access.redhat.com/localhost
[admin@10 ~]$

The following is a different case of image searching without having to specify the address of the image repository server :

[admin@10 ~]$ podman search hello-world
INDEX      NAME                                                DESCRIPTION                                      STARS   OFFICIAL  AUTOMATED
docker.io  docker.io/library/hello-world                       Hello World! (an example of minimal Dockeriz...  1443    [OK]
docker.io  docker.io/tutum/hello-world                         Image to test docker deployments. Has Apache...  81                [OK]
docker.io  docker.io/ansibleplaybookbundle/hello-world-apb     An APB which deploys a sample Hello World! a...  1                 [OK]
docker.io  docker.io/ansibleplaybookbundle/hello-world-db-apb  An APB which deploys a sample Hello World! a...  1                 [OK]
docker.io  docker.io/dockercloud/hello-world                   Hello World!                                     19                [OK]
docker.io  docker.io/kitematic/hello-world-nginx               A light-weight nginx container that demonstr...  149
docker.io  docker.io/crccheck/hello-world                      Hello World web server in under 2.5 MB           15                [OK]
docker.io  docker.io/thomaspoignant/hello-world-rest-json      This project is a REST hello-world API to bu...  1
docker.io  docker.io/infrastructureascode/hello-world          A tiny "Hello World" web server with a healt...  0                 [OK]
docker.io  docker.io/vad1mo/hello-world-rest                   A simple REST Service that echoes back all t...  5                 [OK]
docker.io  docker.io/ppc64le/hello-world                       Hello World! (an example of minimal Dockeriz...  2
docker.io  docker.io/garystafford/hello-world                  Simple hello-world Spring Boot service for t...  0                 [OK]
docker.io  docker.io/strimzi/hello-world-consumer                                                               0
docker.io  docker.io/freddiedevops/hello-world-spring-boot                                                      0
docker.io  docker.io/datawire/hello-world                      Hello World! Simple Hello World implementati...  1                 [OK]
docker.io  docker.io/strimzi/hello-world-producer                                                               0
docker.io  docker.io/strimzi/hello-world-streams                                                                0
docker.io  docker.io/burdz/hello-world-k8s                     To provide a simple webserver that can have ...  0                 [OK]
docker.io  docker.io/koudaiii/hello-world                                                                       0
docker.io  docker.io/rancher/hello-world                                                                        1
docker.io  docker.io/souravpatnaik/hello-world-go              hello-world in Golang                            1
docker.io  docker.io/businessgeeks00/hello-world-nodejs                                                         0
docker.io  docker.io/markmnei/hello-world-java-docker          Hello-World-Java-docker                          1                 [OK]
docker.io  docker.io/nirmata/hello-world                                                                        0                 [OK]
docker.io  docker.io/airwavetechio/hello-world                                                                  0
[admin@10 ~]$

Since there is an image with the name of ‘hello-world’, just pull it with podman as follows :

[admin@10 ~]$ podman pull hello-world
Resolved "hello-world" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull docker.io/library/hello-world:latest...
Getting image source signatures
Copying blob b8dfde127a29 [--------------------------------------] 0.0b / 0.0b
Copying config d1165f2212 done
Writing manifest to image destination
Storing signatures
d1165f2212346b2bab48cb01c1e39ee8ad1be46b87873d9ca7a4e434980a7726
[admin@10 ~]$

The pulling process of the image with the name of ‘hello-world’ is a success. Since it is exist without having to be stumbled upon the error message of ‘denied: requested access to the resource is denied’.

Leave a Reply