GitHub Packages and Container Registry Flashcards
7 cards from real GitHub Professional Certificate practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 GitHub Packages and Container Registry flashcards as text
What is the base URL for authenticating with the GitHub Container Registry (GHCR)?
Answer: ghcr.io
GitHub Container Registry uses ghcr.io as its base URL for authentication and image pulls/pushes.
Which command correctly logs Docker into the GitHub Container Registry using a Personal Access Token stored in an environment variable TOKEN?
Answer: echo $TOKEN | docker login ghcr.io -u USERNAME --password-stdin
Piping the token via --password-stdin is the recommended secure approach to avoid exposing the token in shell history.
What minimum permission scope is required on a Personal Access Token (classic) to publish packages to GitHub Packages?
Answer: write:packages
The write:packages scope is required to upload and publish package versions to GitHub Packages.
Which package ecosystems does GitHub Packages natively support? (Select the most complete answer)
Answer: npm, RubyGems, Maven, Gradle, Docker, NuGet, and Swift
GitHub Packages supports npm, RubyGems, Maven, Gradle, Docker/OCI containers, NuGet, and Swift package registries.
How do you tag and push a Docker image to GitHub Container Registry for the user 'octocat' and image 'myapp'?
Answer: docker tag myapp ghcr.io/octocat/myapp:latest && docker push ghcr.io/octocat/myapp:latest
You must tag the image with the full ghcr.io path including namespace before pushing with docker push.
Where should the .npmrc file be configured to redirect npm installs to GitHub Packages for a scoped package @myorg?
Answer: In the project root with @myorg:registry=https://npm.pkg.github.com
A .npmrc file in the project root with the scoped registry entry directs npm to use GitHub Packages for that organization's packages.
By default, what visibility does a package published from a private repository inherit on GitHub Packages?
Answer: Private, matching the repository visibility
Packages published from private repositories are private by default, inheriting the repository's visibility setting.
How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy
Sources & references
Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy
- docs.github.com — Test delivery, eligibility · verified Oct 2026
- learn.microsoft.com — Fees, renewal, time limit, score validity, passing score · verified Oct 2026