Skaffold "no push access to ... unauthorized" in CI
Before building, Skaffold checks it can push to the target repository. If the runner has no valid registry credentials, that check fails with an unauthorized error and no build runs.
What this error means
Skaffold fails early with "no push access to repository" or "unauthorized: authentication required" naming the registry it tried to reach.
skaffold
checking push permissions: getting push access to "us-docker.pkg.dev/my-project/my-repo/my-app":
GET https://us-docker.pkg.dev/v2/token: unauthorized: authentication requiredCommon causes
The runner never logged in to the registry
Docker credentials that exist on a developer machine are absent on a clean CI runner, so the push token request is anonymous.
A credential helper is not configured in CI
Cloud registries need a helper (gcloud, aws ecr, docker login) that was not set up before the Skaffold step.
How to fix it
Authenticate to the registry before Skaffold
- Log in to the target registry in a step before build.
- Confirm the credential is written to the Docker config the runner uses.
- Run Skaffold after the login step.
.github/workflows/ci.yml
- name: Log in to registry
run: gcloud auth configure-docker us-docker.pkg.dev --quiet
- name: Build and deploy
run: skaffold run --default-repo=us-docker.pkg.dev/my-project/my-repoUse a docker login for token registries
For registries that accept a username and token, log in with the CI secret.
.github/workflows/ci.yml
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdinHow to prevent it
- Add an explicit registry login step before every Skaffold build.
- Store registry credentials in CI secrets, not in the image.
- Verify the default-repo host matches the registry you logged in to.
Related guides
Skaffold "getting default repo" / missing --default-repo in CIFix Skaffold builds pushing to the wrong registry in CI - without --default-repo, Skaffold uses the image nam…
Skaffold "build failed: unable to stream build output" in CIFix Skaffold "build failed: ... unable to stream build output" in CI - the builder process ended unexpectedly…
Skaffold "tagging failed" in CIFix Skaffold "tagging images: ... failed" in CI - the configured tag policy could not produce a tag, often th…