Skip to content

Accessing private containers in codespaces #23900

Answered by 0rvar
0rvar asked this question in New to GitHub
Discussion options

You must be logged in to vote

I figured out how to do this.

  <a href="https://docs.github.com/en/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry" target="_blank" rel="noopener nofollow ugc">GitHub Docs</a>

Allowing your codespace to access a private image registry - GitHub Docs

These codespace secrets needed to be added:

  • GHCR_CONTAINER_REGISTRY_SERVER : ghcr.io
  • GHCR_CONTAINER_REGISTRY_USER : GitHub account name
  • GHCR_CONTAINER_REGISTRY_PASSWORD : Personal Access Token with registry:read permission

Then, any codespace will need to be deleted and created fresh for these changes to take effect.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant