Accessing private containers in codespaces #23900
-
I have pushed a private base image for codespaces to ghcr.io.
, I get this error:
I can do this locally (where I am authenticated) without issue
The docs only mentions how to authenticate in Github Actions, but not in devcontainer setup for codespaces. So, how do I authenticate Codespaces to read this private docker image, hosted on Github Registry? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I figured out how to do this.
Allowing your codespace to access a private image registry - GitHub DocsThese codespace secrets needed to be added:
Then, any codespace will need to be deleted and created fresh for these changes to take effect. |
Beta Was this translation helpful? Give feedback.
I figured out how to do this.
Allowing your codespace to access a private image registry - GitHub Docs
These codespace secrets needed to be added:
GHCR_CONTAINER_REGISTRY_SERVER
: ghcr.ioGHCR_CONTAINER_REGISTRY_USER
: GitHub account nameGHCR_CONTAINER_REGISTRY_PASSWORD
: Personal Access Token withregistry:read
permissionThen, any codespace will need to be deleted and created fresh for these changes to take effect.