`Devcontainers features publish` cannot handle registries with url path

Aperta
#1,098 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@v-Mathiyarasy ci sta già lavorando.

Dal 26/11/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

When trying to publish my feature to my registry at 'my-registry.com/features-feed', devcontainers searches only for 'my-registry.com' matches in the $DOCKER_CONFIG/config.json file for registry matches, causing authentication to fail.

For example my publish command is:
devcontainer features publish src -r my-registry.com.com/features-feed -n devcontainers/features --log-level trace:

and my $DOCKER_CONFIG/config.json contains the following content (redacted):
{"auths": { "my-registry.com/features-feed": {"auth": "***", "email": "" } }}
Then devcontainer will in the https://github.com/devcontainers/cli/blob/ac2d5b7aeaf0eff69c25ba923609013b28ed67c2/src/spec-configuration/containerCollectionsOCI.ts#L213 always split on the first /, while in the publish command I specified that my registry is at my-registry.com/features-feed.

Devcontainers will try to authenticate by searching the shortened url in the docker config, which doesn't contain the registry, but the full registry url instead. https://github.com/devcontainers/cli/blob/ac2d5b7aeaf0eff69c25ba923609013b28ed67c2/src/spec-configuration/httpOCIRegistry.ts#L239

Example trace output:

[2025-10-31T16:16:10.934Z] Packaging feature collection...
[2025-10-31T16:16:10.936Z] Processing feature: python-development...
[2025-10-31T16:16:11.048Z] Packaged 1 features!
[2025-10-31T16:16:11.048Z] Processing feature: python-development...
[2025-10-31T16:16:11.049Z] > input: my-registry.com/features-feed/devcontainers/features/python-development
[2025-10-31T16:16:11.049Z] >
[2025-10-31T16:16:11.049Z] > resource: my-registry.com/features-feed/devcontainers/features/python-development
[2025-10-31T16:16:11.049Z] > id: python-development
[2025-10-31T16:16:11.049Z] > owner: features-feed
[2025-10-31T16:16:11.049Z] > namespace: features-feed/devcontainers/features
[2025-10-31T16:16:11.049Z] > registry: my-registry.com
[2025-10-31T16:16:11.049Z] > path: features-feed/devcontainers/features/python-development
[2025-10-31T16:16:11.049Z] >
[2025-10-31T16:16:11.049Z] > version: latest
[2025-10-31T16:16:11.049Z] > tag?: latest
[2025-10-31T16:16:11.049Z] > digest?: undefined
[2025-10-31T16:16:11.049Z] Feature Annotations: {"dev.containers.metadata":"{\"name\":\"Python Development\",\"id\":\"python-development\",\"version\":\"0.0.1\"}"}
[2025-10-31T16:16:11.049Z] Fetching published versions...
[2025-10-31T16:16:11.261Z] [httpOci] Attempting to authenticate via 'Bearer' auth.
[2025-10-31T16:16:11.263Z] [httpOci] Environment DOCKER_CONFIG is set to '/home/agent/_work/_temp/DockerConfig'
[2025-10-31T16:16:11.268Z] [httpOci] No authentication credentials found for registry 'my-registry.com' via docker config or credential helper.
[2025-10-31T16:16:11.268Z] [httpOci] No authentication credentials found for registry 'my-registry.com'. Accessing anonymously.
[2025-10-31T16:16:11.268Z] [httpOci] Attempting to fetch bearer token from:  https://my-registry.com/v2/_auth?service=my-registry.com&scope=repository:features-feed/devcontainers/features/python-development:pull
[2025-10-31T16:16:11.340Z] [httpOci] 403 on reattempt after auth: https://my-registry.com/v2/features-feed/devcontainers/features/python-development/tags/list
[2025-10-31T16:16:11.341Z] (!) ERR: Could not fetch published tags for 'features-feed/devcontainers/features/python-development' : {"errors":[{"code":"DENIED","message":"Anonymous is not permitted for the current scope.","detail":[]}]} 
[2025-10-31T16:16:11.341Z] (!) ERR: Failed to publish 'my-registry.com/features-feed/devcontainers/features/python-development'
Lingua principale
TypeScript
Stelle
3k
Fork
461
Merge medio
18m
PR unite (30g)
5

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di devcontainers/cli

Tutte le issue di devcontainers/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.