I'm encountering an authentication issue while using ArgoCD's image updater to automatically update images for deployments when a new image is pushed to Docker Hub. Here's the error message I'm encountering in the image updater log:
level=error msg="Could not get tags from registry: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n" alias= application=nginx image_name=argocd/test image_tag=1.0.1 registry=
To Reproduce
Created a secret with Docker Hub's username and secret using the following command:
The image updater should authenticate successfully with Docker Hub using the provided credentials and update the images automatically whenever a new image is pushed to the registry.
Actual Behavior
Encountering authentication errors as mentioned above.
Additional context
I've verified that the provided Docker Hub credentials are correct and have the necessary permissions. The same issue when using AWS ECR.
Logs
Logs of Image Updater
level=error msg="Could not get tags from registry: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n" alias= application=nginx image_name=argocd/test image_tag=1.0.1 registry=
Logs got on Argo CD UI
Failed to pull image "aswinvj/test:1.0.1": failed to pull and unpack image "docker.io/aswinvj/test:1.0.1": failed to resolve reference "docker.io/aswinvj/test:1.0.1": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
Tried Methods
With the above method also I have tried another methods given in the below blogs:
Describe the bug
I'm encountering an authentication issue while using ArgoCD's image updater to automatically update images for deployments when a new image is pushed to Docker Hub. Here's the error message I'm encountering in the image updater log:
level=error msg="Could not get tags from registry: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n" alias= application=nginx image_name=argocd/test image_tag=1.0.1 registry=
To Reproduce
Created a secret with Docker Hub's username and secret using the following command:
Configured the image updater configmap to use the secret by adding the following line to the argocd-image-updater-config configmap:
Restarted ArgoCD image updater.
Deployed an application using the following YAML file:
Expected behavior
The image updater should authenticate successfully with Docker Hub using the provided credentials and update the images automatically whenever a new image is pushed to the registry.
Actual Behavior
Encountering authentication errors as mentioned above.
Additional context
I've verified that the provided Docker Hub credentials are correct and have the necessary permissions. The same issue when using AWS ECR.
Logs
Logs of Image Updater
level=error msg="Could not get tags from registry: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n" alias= application=nginx image_name=argocd/test image_tag=1.0.1 registry=
Logs got on Argo CD UI
Failed to pull image "aswinvj/test:1.0.1": failed to pull and unpack image "docker.io/aswinvj/test:1.0.1": failed to resolve reference "docker.io/aswinvj/test:1.0.1": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
Tried Methods
With the above method also I have tried another methods given in the below blogs: