# docker push: Usage, Options & Auth Errors in CI

> How docker push works: uploading a tagged image to a registry, naming requirements, and the denied/unauthorized push errors in CI.

Source: https://latchkey.dev/learn/command-reference/docker-push-command  
Updated: 2026-06-25

Upload an image to a registry, named correctly so the push is accepted.

docker push uploads a locally tagged image to a registry. The image name must encode the destination registry and repository. This page covers correct naming and the auth failures CI hits.

## What it does

docker push uploads the layers of a tagged image to the registry named in the tag. You must tag the image with the full registry/repository path first, then push that name.

## Common usage

```Terminal
docker tag myapp:latest ghcr.io/owner/myapp:1.2.3
docker push ghcr.io/owner/myapp:1.2.3

docker tag myapp:latest 123456789.dkr.ecr.us-east-1.amazonaws.com/myapp:latest
docker push 123456789.dkr.ecr.us-east-1.amazonaws.com/myapp:latest
```

## Common errors in CI

The common failure is "denied: requested access to the resource is denied" or "unauthorized: authentication required". Causes: not logged in (run docker login REGISTRY first), the GITHUB_TOKEN lacks packages:write for GHCR, or the image is tagged with a repository you cannot push to. Fix by authenticating with a token that has write scope and tagging with the exact registry/namespace you own.

## FAQ

### docker push: Usage, Options & Auth Errors in CI?

docker push uploads a locally tagged image to a registry. The image name must encode the destination registry and repository. This page covers correct naming and the auth failures CI hits.

### What it does?

docker push uploads the layers of a tagged image to the registry named in the tag. You must tag the image with the full registry/repository path first, then push that name.

### Common errors in CI?

The common failure is "denied: requested access to the resource is denied" or "unauthorized: authentication required". Causes: not logged in (run docker login REGISTRY first), the GITHUB_TOKEN lacks packages:write for GHCR, or the image is tagged with a repository you cannot push to.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
