Skip to content

docker pull unauthenticated #1976

Description

@Pimmetje

Version
docker image: 2.24.1

Describe the bug
I have setup pulp in order to use it as Pull-Through Caching server for containers.
If u authenticate as admin by putting the base64 username:password in the docker config it works.
If i try to pull a already pulled image without authentication it does not work.

To Reproduce
I can pull docker image using docker when i put the base64 authentication in the config. But without authentication it does not work (token disabled)
Without credentials i get "Error response from daemon: Head https://<server>/v2/docker-cache/gitlab/gitlab-ce/manifests/17.9.3-ce.0 no basic auth credentials"

Expected behavior
Ability to pull unauthenticated the container using docker.

Additional context
pulp-dev: gerrod:
Right now our non-token auth code is setup based on how podman works. A logout podman will send the auth header Basic Og== which we use to specify an anonymous user. Docker on the other hand will send no auth header and when it requests the /v2/ endpoint it hits the 401 error because that endpoint expects atleast an anon user.

We should probably just change this hardcoded line: https://github.com/pulp/pulp_container/blob/main/pulp_container/app/registry_api.py#L474

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions