`Devcontainers features publish` cannot handle registries with url path
@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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di devcontainers/cli
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
devcontainers/cli#1203 ·
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 68/100
devcontainers/cli#1178 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
devcontainers/cli#1308 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
devcontainers/cli#1307 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
devcontainers/cli#1305 ·
Tutte le issue di devcontainers/cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
ontola/atomic-server#1625 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
melgarafael/DeskcommCRM#1451 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
-
bug via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bot:ai-assisted component:compact-js status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
midnightntwrk/midnight-sdk#403 ·