Resolving GitHub Container Registry (ghcr.io) Login Issues on macOS
When authenticating or pulling container images and Helm charts from ghcr.io or Docker Hub on macOS, you may encounter the following credential helper error:
error getting credentials - err: exec: "docker-credential-osxkeychain": executable file not found in $PATH
This error occurs when Docker/Helm attempts to delegate credential storage to macOS Keychain via docker-credential-osxkeychain, but the binary helper is missing from your system $PATH.
Solution
Option 1: Install the Docker Credential Helper via Homebrew
Option 2: Authenticate Using GitHub CLI Token
# Obtain GitHub authentication token and log in directly to Helm OCI registry
gh auth token | helm registry login ghcr.io -u <YOUR_GITHUB_USERNAME> --password-stdin
# Or authenticate Docker / Podman directly
echo $(gh auth token) | docker login ghcr.io -u <YOUR_GITHUB_USERNAME> --password-stdin
Once authenticated, pulling images and installing OCI Helm charts will succeed: