Skip to content

Pull OCI datasets with the docker config's credentials - #78

Merged
rzonyx merged 1 commit into
masterfrom
oci-pull-auth
Nov 2, 2026
Merged

rzonyx merged 1 commit into
masterfrom
oci-pull-auth

Conversation

@rzonyx

@rzonyx rzonyx commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

run, datasets download and datasets list pulled every OCI registry anonymously. A dataset in a private package failed with not found, or not public (hbench pulls anonymously), even after docker login. push and export already read that same login.

Store::open now takes the registry's credentials from the docker config, as push and export do: $DOCKER_CONFIG/config.json, else ~/.docker/config.json, using its credential helper, else its auths entry. Without credentials it stays anonymous, and an OCI layout reads no credentials. docs/REFERENCE.md says so, and the anonymous error now says to log in.

Behaviour change: a registry with stale credentials in the config now refuses pulls of its public datasets, rather than falling back to anonymous. docker pull and export already behave this way.

Checks

  • cargo test: 424 passed, including a new test that a registry store takes the config's credentials and an OCI layout store never reads the config. Clippy (-D warnings) and cargo fmt --check are clean.
  • A build of this branch ran against GHCR:
    • With docker login, datasets download of a dataset in a private package fetched all 63 tasks. 0.3.11 refused the same command.
    • With DOCKER_CONFIG pointing at an empty dir, the same command fails with the new message.
    • A public dataset, humanevalfix@1.0, still downloads.
  • push_and_export_use_the_docker_config_credentials now also pulls through Store::open_with_config. It needs HBENCH_TEST_OCI_AUTH_REGISTRY (a registry:3 with htpasswd), so it was skipped here and hasn't run.

🤖 Generated with Claude Code

`run`, `datasets download` and `datasets list` opened every registry
anonymously, so a dataset in a private package failed with "not found, or
not public" even after `docker login`, while `push` and `export` already
read the same login. Store::open now takes the registry's credentials from
the docker config as they do ($DOCKER_CONFIG/config.json, else
~/.docker/config.json: its credential helper, else its auths entry), and
stays anonymous without any. An OCI layout reads no credentials.

A registry with stale credentials in the config now refuses pulls of its
public datasets instead of falling back to anonymous, as `docker pull`
and `export` do. The anonymous error says to log in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rzonyx
rzonyx merged commit 17e1b4f into master Nov 2, 2026
9 checks passed
@rzonyx rzonyx mentioned this pull request Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants