User login api for ghcr


For docker hub registry there is any user login api which is when it the equvilient for ? we need it for our API’s…


Hey, Jenny!

You find it in the docs.


GHCR implements the registry specification as defined by Docker which is meant to serve the Docker Engine.

That being said, you can still get a token by making a GET request to /token like:

✦ ➜ curl -v -u {GH username}:{GH PAT}\?scope=repository:{namespace}/{image}:pull

This will return a token in the response if you have access to the requested image:


This follows the specification described by docker here

We don’t currently support the _catalog endpoint which would allow you to list all repositories that you have access to, although this is planned in the future