The Container Registry ( ‘https://ghcr.io’ ) offers improved performance for containers and will supersede the Docker registry in the future.
With that said, I’ve seen a few customers struggling to use the new GitHub Container Registry offering with Harness. It happens more with Private Repos, but maybe you are having a hard time with the public approach too.
Since I had to use the PAT (Personal Acess Token) to find my images, I want to share that with you.
You must enable the improved container support with container registry. Just follow this very quick tutorial:
As you can see, I have two packages on my GitHub Account. One of them is private, which makes our life a little harder. Just a little:
Let’s create one Personal Access Token. Go to your profile icon on the top right, then Settings, then Developer settings.
Then go through the Generate new token wizard.
Now, let’s store out PAT. Please go to Security → Secrets Management → Secrets → Encrypted Text.
There’s a hardcore way to generate a token from that PAT. But that’s misleading and will expire.
So, feel free to add the entire PAT there:
Now, we start the trick. Go to Setup → Connectors → Artifact Servers.
Add a new Artifact Server from Docker Registry type:
I’m not a big ECS fan, but let’s create an Amazon Elastic Container Service (ECS) Service.
You will see that we have a Docker Image Artifact Type, right?
So, these are my new Artifact Sources:
Pretty easy, right?
Now you are not afraid of GitHub Packages - Container Registry anymore, I hope.
<cloud: aws, azure, tanzu, gcp, on-prem, kubernetes, github, docker, container registry>
<type: howto, experts>
<category: triggers, gitops, templates>