Manually publish images to GitHub Container Registry (GHCR)

This is just a short little post on how to manually publish images to GitHub Container Registry (GHCR). Looking at the documentation, the usual way to go seems to be to use GitHub Actions and automatically build and publish images onto the registry. However, I do have one use case where images aren’t built via GitHub Actions but offline on a machine of mine, yet I still want to make the images available via It took me longer than it should have to figure out how to manually authenticate to, so here are the steps.

Generate Personal Access Token

At first, you might think that you can authenticate with GHCR just by simply using your GitHub username and password. That is not the case. To authenticate you will need a token, a so-called personal access token (PAT). Head over to GitHub and click on the drop-down of your user on the top right. From there, head into Settings. Then click on Developer settings at the bottom of the left side. Now click on Personal access token and from there Generate new token:

Next, give your token a meaningful name, choose an expiration of your liking and check the write:packages scope, then hit Generate token at the bottom of the page:

Make sure you copy your token, you will not be able to see it again!

Login to

The next step is rather straightforward. Head into the command line (or whatever tool you are using) and authenticate with via the usual docker login or similar methods. Your username is your GitHub username or the organization that you want to publish the image to and your password is the personal access token. On successful login, you should see something like this:

$ podman login
Username: <your GitHub username/organization>
Password: <your personal access token>
Login Succeeded!

Publish images to GHCR

Once logged in, you are ready to publish your images to<your GitHub username/organization>/<your package name>, for example:

$ podman push localhost/gvenzl/oracle-xe:latest

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.