Docker authentication
Quick guide to authenticating Docker with GitHub Container Registry.
1. Create a personal access token (PAT)
- Go to GitHub Developer Settings > Personal access tokens > Tokens (classic).
- Generate a new token (classic).
- You can name this token "Docker CLI" for future reference.
- Select the
read:packagesscope (minimum required to pull images). - Copy the PAT token.
2. Authenticate
Run the following command in your terminal to log in:
docker login ghcr.io
Use your GitHub username. Use your PAT as the password.
3. Verify
If successful, you will see:
Login Succeeded